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

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

Reply
Anonymous
Not applicable

Trouble with IF Function

Hi All, 

 

I am trying to create a calculated measure that would assign a value of 1 (if true), and 0 (if false). 

 

My IF function is not returning the info in my graph data when i try to create this measure. A screenshot is attached, i am trying to give a value of 1 if Danger Zone > Days Coverage. 

 

I am trying to do: In Danger ? = If([danger zone]>[Days Coverage],1,0) or something similar. It won't let me bring in danger zone or days coverage. I have looked into creating a column as well. 

 

Danger Zone.png

1 ACCEPTED SOLUTION
JarroVGIT
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Can you please post some sample data or at the very least your datamodel structure? You show picture of a table visual, a visual that typically aggregates values. If this is the original datasource, or you want this to be a measure, you might try

Measure = IF(SELECTEDVALUE(Table[Danger Zone], 0) > SUM(Table[Days Coverage]), 1, 0)

CalculatedCOlumn = IF(Table[Danger Zone] > Table[Days Coverage], 1, 0)

Let me know if this helps

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
JarroVGIT
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Can you please post some sample data or at the very least your datamodel structure? You show picture of a table visual, a visual that typically aggregates values. If this is the original datasource, or you want this to be a measure, you might try

Measure = IF(SELECTEDVALUE(Table[Danger Zone], 0) > SUM(Table[Days Coverage]), 1, 0)

CalculatedCOlumn = IF(Table[Danger Zone] > Table[Days Coverage], 1, 0)

Let me know if this helps

 

Kind regards

Djerro123

-------------------------------

If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

Keep those thumbs up coming! 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.