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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

OR in an IF Statement

Hi everyone, 

 

I have a need to ensure that the TTSCORE shows value in the graph only if one value is selected in the "Unit" filter or 

 

Default =
IF(OR((HASONEFILTER(Unit[Unit]),(HASONEFILTER(Site[Site])) ,SUM(GraphPlot[TTSCORE]), 0)
))
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

I got lost in all the parentheses. Is this what you're trying to write?

 

Default =
IF (
    HASONEVALUE ( Unit[Unit] ) || HASONEVALUE ( Site[Site] ),
    SUM ( GraphPlot[TTSCORE] ),
    0
)

View solution in original post

3 REPLIES 3
AlexisOlson
Super User
Super User

I got lost in all the parentheses. Is this what you're trying to write?

 

Default =
IF (
    HASONEVALUE ( Unit[Unit] ) || HASONEVALUE ( Site[Site] ),
    SUM ( GraphPlot[TTSCORE] ),
    0
)
Anonymous
Not applicable

Alexis

 

I have further expanded the measure as below but it is not working!

 

TotalScore =
IF (
HASONEFILTER ( Unit[Unit] ) || HASONEfilter ( Site[Site] ) || HASONEfilter ( SystemTotalScore[SYSTEM] ) || SELECTEDVALUE(System[System]) <> "Multiple Selections",
SUM ( SystemTotalScore[TTSCORE] ),
0
)
 
The "system" filter, i have selected from the "format" tab to have the "select all" turned on, but when we select multiple System, the graph need to show TTSCORE as 0 and i could not figure out. CAn you help?
 
Anonymous
Not applicable

I think so Alexis! you are awesome. I did not know you can do it this way!

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.