Forum Discussion
billuran09
6 years agoFrequent 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
- VasTgMemorable Member
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
- AnonymousNot applicableI think in your case you need to use calculated column not measure.
New column= if(table[column]="condition","result1","result2")
Thanks
Pravin