Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I have a slicer filled with TeamNames that drives data in a table.
The TeamNames table has "Table" and "Status"(which is either Active or Inactive).
What I want to do is put next to the slicer some sort of checkbox ??? that says "Include Inactive", so when this is checked, the slicer would change to include Inactive Teams ?
Not sure if PowerBI has this capability ?
Solved! Go to Solution.
Hi @EaglesTony
This is my test table:
Slicer Table
First create the following measure:
Measure = IF(SELECTEDVALUE('Table'[InactiveFlag]) = "Active" , 1,IF(ISFILTERED('Slicer Table'[Include InActive]),1, 0))
Then apply filter for the measure:
This is the result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The issue with this, is the user only wants to see active until they select the a slicer with text of "Include History", which will then bring in all the active and inactive(these are the history records) and when they click the inactive so it is off, they want it to only show the active ones again.
I was thinking of designing the table:
Team Historical Non-Historical
Team1 Include On Historical Check Include On Historical Uncheck
Team2 Include On Historical Check Include On Historical Uncheck
Team3 Include On Historical Check
Maybe these 2 columns could be used some way to create another column to filter the slicer ?
Hi @EaglesTony
This is my test table:
Slicer Table
First create the following measure:
Measure = IF(SELECTEDVALUE('Table'[InactiveFlag]) = "Active" , 1,IF(ISFILTERED('Slicer Table'[Include InActive]),1, 0))
Then apply filter for the measure:
This is the result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @EaglesTony
I don't think it's necessary to make it so complicated to meet your needs. You can use a preselected slicer, which will allow you to default to selecting the active team when opening the report, while also providing options for inactive and select all.
_PreselectedSlicer = DATATABLE(
"IsDirtySlicer", BOOLEAN,
{
{TRUE()},
{FALSE()}
}
)
Pre select = VAR _selectColumn = SELECTEDVALUE('Table'[Column])
RETURN _selectColumn = "Active"
When you fiest open the report the preselected slicer will default choose "Active":
If you want show all the teams ,you just need to press CTRL key and click InActive:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @EaglesTony
Based on your needs, I have created the following table.
Then you need to create a calculate column to judge which team is active and which is not.
Column = IF('Table'[InactiveFlag] = 1 , "InActive" , "Active")
Create two slicers:
Result:
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I like this. I'm wondering if I can have "Active" be the default then have one for just "Inactive" and then a 3rd be "Both" (I assume I would need another column on the table for this where all the teams would have this filled in")
I started this, but trying to put it all together:
I'm almost thinking if I have 1 slicer with the teams then the 2nd would be just one box "Include InActive" and some what the 2nd one toggle the 1st slicer, but maybe I need a bridge table or a certain relationship setup ?
Another way would be to use bookmarks. Active and inactive would be separate buttons with bookmarks showing one or the other, which shows you the visual including the inactive or the one without inactives.
Hi Tony,
Did you try to create a second slicer as a checkbox for status and having a filter on the second checkbox slicer to only show active? By default, it should be selected. Unselecting results with showing all data.
Another option is to create a table and connecting to the TeamNames table over Status:
Status | Status Selection |
Active | Only Active |
Inactive | Include Inactive |
Active | Include Inactive |
Checkbox-slicer column would be Status Selection.
Regards,
Oktay
Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.
Here is what I was thinking.
There is a table, called Teams with 2 columns, one is the TeamName and the other is "InactiveFlag"(which would be 1, if the team is inactive).
My first slicer would have TeamName in it and a filter on it to filter out those with "InactiveFlag = 1".
Here is where I am stuck, I need something to allow the user to select "Active" or "InActive", so I was thinking of another slicer showing a checkbox with "Active" and "InActive" and based off this, the first slicer would be filtered ??
My first table (which currently populates the slicer) would be Table1 which has the fields "Team" and "InactiveFlag", this slicer would only have "Team" in it.
Table1
Column Value
Team Team1
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
83 | |
65 | |
49 |
User | Count |
---|---|
127 | |
108 | |
89 | |
70 | |
66 |