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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.