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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
onurkrbck
Regular Visitor

Using a measure as ResultIfTrue in IF statement

Hi,

 

I have "goals" table and "opportunities" table in Power BI. I created a few "Measures" in goals table by using the data in "opportunities" table. One of these measures are as below. Since there is no sensitive data in the formula, I shared it below as is.

 

Also, there is a multiselect option field in our CRM opportunty entity, field name is "2021 Target". Field is being used to calculate targets. I have splited this field in Power BI to be ale to use it.

 

Below formula gives the result of that the sum of the revenues of the opportunities which "Hardware Sales Revenue" option has been choosen in the 2021 Target field.

 

Funnel Hardware Sales Revenue = CALCULATE(SUM('opportunities'[Revenue]) , FILTER('opportunities' 'opportunities'[new_2021target.1value]="Hardware Sales Revenue" || 'opportunities'[new_2021target.2value]="Hardware Sales Revenue" || 'opportunities'[new_2021target.3value]="Hardware Sales Revenue" || 'opportunities'[new_2021target.4value]="Hardware Sales Revenue" || 'opportunities'[new_2021target.5value]="Hardware Sales Revenue"))
 
This formula works fine. There is no problem at it.

 

The point I stuck is I want to add a new column into goals table and I want to use IF statement in this column.
 
Let's say goal title is "ABC"
 
The formula I want to use in the new column:
IF(goals[title]="ABC",[Funnel Hardware Sales Revenue],0)
 
When I tried the use this formula, all falses give "0" but true does not give antthing. That row does not have any data in this new column.
 
How can I solve this?
 
Thanks
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @onurkrbck ,

 

The syntax you used is incorrect. To my knowledge, we could not get the column title via DAX.

 

Eyelyn9_0-1640914738447.png

 

I have created a data sample:

 

Eyelyn9_2-1640915336818.png      Eyelyn9_5-1640915631174.png

 

Then you could directly use 

ABC = [Funnel Hardware Sales Revenue]

to create a ABC column.

Eyelyn9_6-1640915777845.png

 

Best Regards,
Eyelyn Qin
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
Anonymous
Not applicable

Hi @onurkrbck ,

 

The syntax you used is incorrect. To my knowledge, we could not get the column title via DAX.

 

Eyelyn9_0-1640914738447.png

 

I have created a data sample:

 

Eyelyn9_2-1640915336818.png      Eyelyn9_5-1640915631174.png

 

Then you could directly use 

ABC = [Funnel Hardware Sales Revenue]

to create a ABC column.

Eyelyn9_6-1640915777845.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

PC2790
Community Champion
Community Champion

Would it be possible for you to provide the data model?

It'll be easier to understand the problem

Hi,

I am not experienced in Power BI. So my data model could be "weird" to you.

Sorry for the inconvenience 🙂

 

onurkrbck_0-1640693690711.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors