Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi, I have 2 slicers on the same column (e.g., KPI). I also have 2 line charts, and in each line chart I display the timeseries of 1 KPI (used edit interactions to have each slicer's selection affect only one line chart).
In the same page I also have a table, in which I would like to display information about both KPIs selected separately with the 2 slicers (basically I want to union the results of the selection).
Does anyone know if and how this is possible to achive in Power BI (e.g., creating an ad-hoc measure to filter the table)?
Hi @Greg_Deckler , thanks for the reply. Here some more details with sample data:
Raw data
KPI | QUARTER | VALUE |
A | Q1-23 | 10 |
A | Q2-23 | 12 |
B | Q1-23 | 100 |
B | Q2-23 | 120 |
Power BI Visual Elements
2 slicers and 2 line charts:
One table filtered with the union of the results from the 2 slicers (KPIs A & B):
NB: I have lot of KPIs and having the 2 slicers not filtering the table is not the solution cause in the table all KPIs will be visible (not just A&B, as wanted here).
Hope this clarifies better.
@mmoggia OK, so here is a thought. Create 2 tables for your slicers using DISTINCT('Table'[KPI]). Make sure these are disconnected tables ( no relationships ). You can then construct a complex selector similar to the following:
Complex Selector =
VAR __KPI = MAX('Table'[KPI])
VAR __Slicer1 = DISTINCT('Slicer1'[KPI])
VAR __Slicer2 = DISTINCT('Slicer2'[KPI])
VAR __SlicerTable = UNION( __Slicer1, __Slicer2 )
VAR __Return = IF( __KPI IN __SlicerTable, 1, 0 )
RETURN
__Return
Then use your Filter pane to filter the table for when this measure equals 1.
@mmoggia It sounds like you want a Complex Selector, but it's difficult to know for sure without more information. The Complex Selector - Microsoft Fabric Community
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
102 | |
71 | |
64 | |
39 |