The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I need a checkbox slicer where either of two criteria is true. The two criteria are from separate tables (but are related to the fact table.)
Here's a simplified example.
Table 1 lists facilities ([Facility #]; [Facility Name])
Table 2 lists departments ([Department #]; [Department Name])
If the user checks my checkbox they should filter for any facts where the Facility is "New York Office" or where the department number is "1234".
Thank you!
David
Solved! Go to Solution.
Hi,
Thanks for the solution parry2k offered,and i want to offer some more information for user to refer to.
hello @DavidWeaver , based on your description, you need to create two slicers. you can refer to the following solution.
Sample data
Department table
facility table
fact table
relationship.
create a measure.
MEASURE =
CALCULATE (
SUM ( facttable[Value] ),
OR (
facttable[Facility #] IN VALUES ( facilities[Facility #] ),
facttable[Department #] IN VALUES ( departments[Department #] )
),
CROSSFILTER ( departments[Department #], facttable[Department #], NONE ),
CROSSFILTER ( facttable[Facility #], facilities[Facility #], NONE )
)
create two slicers,put the facility name and department name to the slicers, then create a table visual, then put the fact field and measure to the table visual.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for the solution parry2k offered,and i want to offer some more information for user to refer to.
hello @DavidWeaver , based on your description, you need to create two slicers. you can refer to the following solution.
Sample data
Department table
facility table
fact table
relationship.
create a measure.
MEASURE =
CALCULATE (
SUM ( facttable[Value] ),
OR (
facttable[Facility #] IN VALUES ( facilities[Facility #] ),
facttable[Department #] IN VALUES ( departments[Department #] )
),
CROSSFILTER ( departments[Department #], facttable[Department #], NONE ),
CROSSFILTER ( facttable[Facility #], facilities[Facility #], NONE )
)
create two slicers,put the facility name and department name to the slicers, then create a table visual, then put the fact field and measure to the table visual.
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@DavidWeaver check this blog post that I wrote long time ago, tweak the solution as you see fit:Multiple Slicers-Use “OR” Condition To Visualize Data | PeryTUS
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.