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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
billuran09
Frequent Visitor

If Statement Issue

Weird issue, but i a sure simple solution. Note: I am a QLik guy, learning DAX

Creating New Measure in report view:
Example Goal: Trying to create if statement based on field value:
However after my "TESTMEASURE= if("

i cannot reference a table or field, just measures or other DAX commands. So i cant state my condition.
I want to if fieldA ="Fixed" then X else Y but I can call field A

Thanks,

Bill

2 REPLIES 2
VasTg
Memorable Member
Memorable Member

@billuran09 

 

A measure is an aggregation, you should either use MIN, MAX, SUM etc to refer to that column.

Max(fieldA) will work.

 

If you want to calculate the value for each row in the table, then you should create "New column"

 

If it helps, mark it as a solution

Kudos are nice too

 

Connect on LinkedIn
Anonymous
Not applicable

I think in your case you need to use calculated column not measure.

New column= if(table[column]="condition","result1","result2")

Thanks
Pravin

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.