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.

Thanks,

Karen
Karen SchaeferBI ANALYSTAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Karen SchaeferBI ANALYSTAuthor Commented:
Thanks
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Karen!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.