cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
callum Member
Member

Boolean slicer-like element?

Hi,

 

One column in my data is the type of payment for car parks, e.g. free, pay and display, etc.

 

I want to add a checkbox that will filter the data to only the free car parks, i.e. when it's checked then only the free car parks are shown, when it's unchecked then all are shown. How might I do this?

 

If I use a normal slicer element then it shows all the different types. Which obviously can have the effect of filtering only the free ones, but is a bit more bloated than it perhaps should be.

 

I have added another column with DAX to indicate whether it's free or not:

Free = IF([Type of car park] = "Free", TRUE(), FALSE())

but I don't know where to go from here.

 

Thanks

8 REPLIES 8
ValubiMartin Senior Member
Senior Member

Re: Boolean slicer-like element?

Hi @callum

 

Given that your "Free" column works as intended, you just add it to a slicer-visual and use it as your please. 

 

Let me know if you need any help.

 

Best,

Martin

ValubiMartin Senior Member
Senior Member

Re: Boolean slicer-like element?

Hi @callum

 

Did you solve your issue?

callum Member
Member

Re: Boolean slicer-like element?

Thanks for the response. I maybe should have been more specific in my question. By applying the Free column to the slicer I still end up with two checkboxes, labelled true and false. What I'm after is just one single checkbox, labelled something like "Only show free car parks" for example. However if there is no way to do this then I suppose I'll have to make do with your suggestion.

ValubiMartin Senior Member
Senior Member

Re: Boolean slicer-like element?

I'm afraid there isn't any other solution. Not that I know of, at least. 

Highlighted
callum Member
Member

Re: Boolean slicer-like element?

Okay, that's unfortunate. Thanks for your help anyway!

Moderator v-sihou-msft
Moderator

Re: Boolean slicer-like element?

@callum

 

In this scenario, since you need this "Free" to be a checkbox, I guess you will use this value for filtering/slicing data. However, unless you cascading filter a slicer, you can't remove values from a field populating into a slicer. So I suggest you just put [Type of car park] into a slicer for filtering data, and create a measure to show text like "Only show free car parks" in a Card.

 

Regards,

BobbyTables Frequent Visitor
Frequent Visitor

Re: Boolean slicer-like element?

Is there any official PowerBI Idea that would solve this? I would have at least half a dozen applications of this, so I would love to vote for an implementation of this.

shebr Member
Member

Re: Boolean slicer-like element?

Hi @callum,

 

Have you considered using Bookmarks? With bookmarks you can create a filtered view of your data by the use of a 'button' and apply the filter using action tab. That way when you click the button you can filter the data. You may also need another button that goes back to the unfiltered view.

 

Here's a video that show how to use the bookmarks feature.

 

https://youtu.be/j-KP1G_c8PQ

 

 

 

 

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 281 members 2,964 guests
Please welcome our newest community members: