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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kaye123
Frequent Visitor

PowerQuery If Statement with Result from Measure of another table

I created a custom table that have 4 different Names. Then I will add a column with a Measure from different tables but with conditional if statement.  See target condition below.

 

Column1

If TextA = TableQueryA_Measure1,

If TextB = TableQueryB_Measure1 .

 

Column2

If TextA = TableQueryA_Measure2,

If TextB = TableQueryB_Measure2.

Tried using below formula but still having some errors using CUSTOM COLUMN. Thanks in advance
Column1= If ([TextColumn0] = "Text1",  TableQueryA_Measure1, TableQueryB_Measure1)

1 ACCEPTED SOLUTION
kaye123
Frequent Visitor

This is now ok. I used a SWITCH code instead of IF statement. Worked like a charm.

View solution in original post

2 REPLIES 2
kaye123
Frequent Visitor

This is now ok. I used a SWITCH code instead of IF statement. Worked like a charm.

HotChilli
Super User
Super User

It looks like you are trying to use measures (created for visuals in powerbi report view) in Power Query.  That's definitely not possible.

Maybe if you give more details about what you are trying to achieve I can offer some advice.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.