Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Here's a situation I can't puzzle out.
I have a large table with a column that contain one of three values: A, B, or X.
I need to add a slicer to a report that uses this table, based on that column. However the slicer should only contain two choices: Yes and No.
Yes should include rows with values A or X.
No should include rows with values B or X.
How can we make a slicer that will do this? The table is large (hundreds of millions of rows), so solutions with too many steps are probably out as they won't perform.
Would love ideas for an elegant solution if anyone has any. This one is breaking my brain!
Thank you.
Solved! Go to Solution.
Hi @markmsc
Use Enter Data to create a table with Two rows for Yes and Two for No join this table onto the large list:
Join these together using Single from the choice table (yes no) to the main table:
Use this in a slicer:
If this works please mark it as a solution for others to find 🙂
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Hello @markmsc
imho you need to work like this
Step1 create the table slicer:
SlicerTable =
DATATABLE(
"YesNo", STRING,
{
{"Yes"},
{"No"}
}
)
Step 2 Create a Measure:
IncludeRow =
VAR SelectedValue = SELECTEDVALUE(SlicerTable[YesNo])
RETURN
IF(
SelectedValue = "Yes" && Table[Value] IN {"A", "X"},
1,
IF(
SelectedValue = "No" && Table[Value] IN {"B", "X"},
1,
0
)
)
Step 3 put the measure in the slicer pane:
Set the filter to only include rows wher includerow =1
Let me know and don't forget to mark as accepted solution 😉
Hello @markmsc
imho you need to work like this
Step1 create the table slicer:
SlicerTable =
DATATABLE(
"YesNo", STRING,
{
{"Yes"},
{"No"}
}
)
Step 2 Create a Measure:
IncludeRow =
VAR SelectedValue = SELECTEDVALUE(SlicerTable[YesNo])
RETURN
IF(
SelectedValue = "Yes" && Table[Value] IN {"A", "X"},
1,
IF(
SelectedValue = "No" && Table[Value] IN {"B", "X"},
1,
0
)
)
Step 3 put the measure in the slicer pane:
Set the filter to only include rows wher includerow =1
Let me know and don't forget to mark as accepted solution 😉
I changed my mind probably you don't need the calculated column
Hi @markmsc
Use Enter Data to create a table with Two rows for Yes and Two for No join this table onto the large list:
Join these together using Single from the choice table (yes no) to the main table:
Use this in a slicer:
If this works please mark it as a solution for others to find 🙂
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |