Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
105 | |
79 | |
71 | |
66 |
User | Count |
---|---|
141 | |
107 | |
100 | |
82 | |
74 |