Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Jackie003
Frequent Visitor

How to recreate formula from access to PowerQuery M language

Hello, 

I have a problem with such formula:

IIf([Sales Orig Area Code]>[Sales Dest Area],[Sales Dest Area] & "-" & [Sales Orig Area Code],[Sales Orig Area Code] & "-" & [Sales Dest Area]) AS [Planned OnD Area Pair vv]

I dont understand how to write it in Power Query correctly.. 

Does anyone can help with that? 

Thanks, a lot in advance 🙂 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Jackie003 

 

Try this

 

= if [Sales Orig Area Code]>[Sales Dest Area] then [Sales Dest Area] & "-" & [Sales Orig Area Code] else [Sales Orig Area Code] & "-" & [Sales Dest Area]

 

If that doesn't do what you want, please post your file and some sample data.

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Jackie003 

 

Try this

 

= if [Sales Orig Area Code]>[Sales Dest Area] then [Sales Dest Area] & "-" & [Sales Orig Area Code] else [Sales Orig Area Code] & "-" & [Sales Dest Area]

 

If that doesn't do what you want, please post your file and some sample data.

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors