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
JimJim
Responsive Resident
Responsive Resident

Measure overrides slicer selection

Hi Guys,

 

I have the following measure:

 

Is Compliant = SWITCH(SELECTEDVALUE('Timesheet Compliance'[IsCompliant]),1,"✓","☓")
 
The problem I have is the measure returns an "☓" for every other row, even the ones that aren't in the slicer selection. As a result, when I filter my page for North America, the table shows all users from all regions and the users from other regions have an "☓"
 
How can I ensure that the measure only calculates rows that meet the slicer selection?
 
 
1 ACCEPTED SOLUTION
JimJim
Responsive Resident
Responsive Resident

 Guys, I'm sorry but I completely complicated this whole thing. I simply had to remove the ELSE part of the measure. My new measure is:

 

Is Compliant = SWITCH(SELECTEDVALUE('Timesheet Compliance'[IsCompliant]),1,"✓",0,"☓")
 
I failed to tell you that the only values in IsCompliant are 1 and 0, if I had told you this I'm sure someone would have gave me the correct answer straight away.
 
Thanks to everyone who contributed.

View solution in original post

6 REPLIES 6
JimJim
Responsive Resident
Responsive Resident

 Guys, I'm sorry but I completely complicated this whole thing. I simply had to remove the ELSE part of the measure. My new measure is:

 

Is Compliant = SWITCH(SELECTEDVALUE('Timesheet Compliance'[IsCompliant]),1,"✓",0,"☓")
 
I failed to tell you that the only values in IsCompliant are 1 and 0, if I had told you this I'm sure someone would have gave me the correct answer straight away.
 
Thanks to everyone who contributed.

Hi @JimJim ,

 

Glad to hear that you have resolved your problem. Thank you for sharing this wonderful solution, would you please kindly mark your shared solution as an answer so that it can benefit more users?  If you have any other questions about this scenario, please kindly ask here and we will try to resolve it.


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Pragati11
Super User
Super User

Hi @JimJim ,

 

What values does your column 'Timesheet Compliance'[IsCompliant] have?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

v-lid-msft
Community Support
Community Support

Hi @JimJim ,

 

We can try to use the following measure to meet your reqirement:

 

Is Compliant =
IF (
    COUNTROWS ( 'Timesheet Compliance' ) = 0
        || MAX ( 'Timesheet Compliance'[IsCompliant] )
            = BLANK (),
    BLANK(),
    IF (
        MAX ( 'Timesheet Compliance'[IsCompliant] ) = 1,
        "✓",
        "☓"
    )
)

 

If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@JimJim Is your problem solved? Can you accept a solution, it will help others with similar questions. Thanks!

 

Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@JimJim wht are the unique Is Compliant values? in the meantime try this

 

Is Compliant = 
SWITCH(
SELECTEDVALUE(TRUE(),
'Timesheet Compliance'[IsCompliant])=1,"✓",
'Timesheet Compliance'[IsCompliant])<>1,"☓"
)

Would appreciate Kudos 🙂 if my solution helped. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.