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
I have a slicer with two options: TRUE or FALSE. I want to show only options "Select All" and "FALSE." When false is selected, the data for FALSE is shown, and when "Select All" is selected, data for both true and false are shown in the table.
Solved! Go to Solution.
Hi, @monishd
Since you didn't give specific data to test, I assumed a simple data set myself:
You can then create a SlicerTable first via New Table like bhanu_gautam :
SlicerTable =
DATATABLE ( "Selection", STRING, { { "Select All" }, { "FALSE" } } )
Then create a simple Measure:
FilterMeasure =
IF (
SELECTEDVALUE ( SlicerTable[Selection] ) = "FALSE",
IF ( MAX ( 'Table1'[Result] ) = "FALSE", 1, 0 ),
1
)
Finally drag the created Measure to the Filter panel and set the filter condition to 1. This is the final result:
The pbix file for this example has been put at the end, I hope you find it helpful!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @monishd
Since you didn't give specific data to test, I assumed a simple data set myself:
You can then create a SlicerTable first via New Table like bhanu_gautam :
SlicerTable =
DATATABLE ( "Selection", STRING, { { "Select All" }, { "FALSE" } } )
Then create a simple Measure:
FilterMeasure =
IF (
SELECTEDVALUE ( SlicerTable[Selection] ) = "FALSE",
IF ( MAX ( 'Table1'[Result] ) = "FALSE", 1, 0 ),
1
)
Finally drag the created Measure to the Filter panel and set the filter condition to 1. This is the final result:
The pbix file for this example has been put at the end, I hope you find it helpful!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@monishd ,Create a Disconnected Table for the Slicer:
Go to the "Modeling" tab and select "New Table."
Create a table with the values you want in the slicer:
DAX
SlicerTable = DATATABLE(
"Selection", STRING,
{
{"Select All"},
{"FALSE"}
}
)
Create a Measure to Control the Data Display:
Create a new measure that will control the data display based on the slicer selection:
DisplayData =
VAR SelectedValue = SELECTEDVALUE(SlicerTable[Selection])
RETURN
IF(
SelectedValue = "Select All",
1,
IF(
SelectedValue = "FALSE" && [YourColumn] = FALSE,
1,
0
)
)
Apply the Measure to Your Visual:
Add the measure to the visual-level filters of your table.
Set the filter to show items where DisplayData is 1.
Add the Slicer to Your Report:
Add a slicer visual to your report and use the SlicerTable[Selection] column.
Proud to be a Super User! |
|
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 |
---|---|
89 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
126 | |
110 | |
87 | |
70 | |
66 |