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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MikeDubya
Helper I
Helper I

Need True and False in a Slicer, but nothing is True in data as of yet

Hello, 

I have a need for a slicer that only shows rows that have a flag of true. Unfortunately, my data currently only has data with the false flag.

 

I have tried a few differnet things, but really no luck. The false data continues to show when right now, nothing should be showing in my table visual. 

 

The Flag is based off of a Calculated column. If a date is in between a From Date and To Date, it is TRUE, else it is FALSE.

Currently what I see is this:

User IDTaskCountBetween Dates
1A50FALSE
2A43FALSE
3B2FALSE
4C1FALSE
5D700FALSE

 

And my slicer looks like this:

MikeDubya_0-1718209021975.png

Because there are currently no rows that are true, it isn't an option.

 

What I want to see is this:

User IDTaskCountBetween Dates
    
    
    
    
    

 

And if a True ever shows up, then this:

User IDTaskCountBetween Dates
5Misc700TRUE

 

But since I have nothing with True currently, I can't set up the slicer correctly.

I have tried a T/F Table and a Switch measure that gave me True, like this:

MikeDubya_1-1718209575432.png

but it didn't work for me.

This is the switch measure: 

TF_SWITCH =
SWITCH(
    SELECTEDVALUE('T/F'[T/F]),
    "True", CALCULATE(MAX('TABLE'[USER_ID]), FILTER('TABLE', [BETWEEN_DATES] <> FALSE())),
    "False", CALCULATE(MAX('TABLE'[USER_ID]), FILTER('TABLE', HLD_MAIN[BETWEEN_DATES] = FALSE()))
)
 
Admittedly, I may not have that set up correctly. I was/am a bit confused on what the first field in Calculate should be. I figured one of the fields in the table that is being displayed, but maybe I am wrong. 
 
Any help would be appreciated!
1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Instead of a switch measure, maybe try creating a relationship from your T/F table to your fact table on the true/false column. Then the T/F slicer should automatically filter 'TABLE'.

View solution in original post

2 REPLIES 2
MikeDubya
Helper I
Helper I

I tried that earlier and it didn't work. That's because I tried joining the wrong table. This was the solution. Thank you!

AlexisOlson
Super User
Super User

Instead of a switch measure, maybe try creating a relationship from your T/F table to your fact table on the true/false column. Then the T/F slicer should automatically filter 'TABLE'.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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