Excel Power Query - compare 2 values and return the new value if there is a difference

What is the proper syntax (DAX) to compare two values and if there is a difference then return the newer value.

Similar to an Index Match. I am using Power Query to create a Pivot Table that will display the current value if match with new value and the new value if there is a difference.

=if (OrgNoA <>OrgNoB, then OrgNoB else OrgNoA.

This has to be in Power Query.


Karen SchaeferBI ANALYSTAsked:
Who is Participating?
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
I think in Power Query Editor, you will need to add a Custom Column with the following formula...

if [OrgNoA]<>[OrgNoB] then [OrgNoB] else [OrgNoA]

Open in new window

Karen SchaeferBI ANALYSTAuthor Commented:
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Karen!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.