Forum Discussion
Dax function "IF"
- 4 years ago
Hi, DagdasAlbag
Column names can't be used directly in measure, you need to use aggregate functions like max() min() selectedvalue() etc....
Like this:
RETURN IF(selectedvalue(table[Year])=2020, BLANK(),result_)Best Regards,
Community Support Team _ Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DagdasAlbag TRy this:
VAR result_ = IF([Aufträge VJ],DIVIDE('Measure'[Abw. in Stk. (Aufträge)],[Aufträge VJ],BLANK()))*100
RETURN IF(Year=2020, BLANK(),result_)
Unfortunately I get the following error message:
No single value can be determined for the "Year" column in the "DimDate" table. This can happen when a measure formula refers to a column with many values without specifying an aggregation such as MIN, MAX, COUNT or SUM to get a single result.
- v-janeyg-msft4 years agoCommunity Support
Hi, DagdasAlbag
Column names can't be used directly in measure, you need to use aggregate functions like max() min() selectedvalue() etc....
Like this:
RETURN IF(selectedvalue(table[Year])=2020, BLANK(),result_)Best Regards,
Community Support Team _ Janey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.