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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DagdasAlbag
Helper I
Helper I

Dax function "IF"

Hello all,

 

how do I get the last two columns in row 3 (year: 2020) without values?

It should look like on the picture 2.

 

Unfortunately it does not work with the following Dax function:

Abw. in % = IF([Aufträge VJ],DIVIDE('Measure'[Abw. in Stk. (Aufträge)],
[Aufträge VJ],BLANK()))*100

 

DagdasAlbag_1-1649677478381.png

 

 

DagdasAlbag_0-1649677411448.png

thank you for the suppor!

 

1 ACCEPTED SOLUTION

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.

View solution in original post

3 REPLIES 3
Tahreem24
Super User
Super User

@DagdasAlbag TRy this:

Measure =
VAR result_ = IF
([Aufträge VJ],DIVIDE('Measure'[Abw. in Stk. (Aufträge)],[Aufträge VJ],BLANK()))*100
RETURN IF(Year=2020, BLANK(),result_)
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

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.

 

DagdasAlbag_0-1649837797904.png

 

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.