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 data as in the below example
Col1 | Col2 | Col3 |
All | Data1 | 1 |
XYZ | Data1 | 2 |
ABC | Data1 | 3 |
All | Data2 | 4 |
All | Data2 | 5 |
I have a slicer that maps to Col1 above and a graph control that shows the values of col3 on a line chart (have not shown the datetime in the above sample).
As in the data above, for Col2=Data1 the Col1 values are 'All' along with other values, whereas for Col2=Data2 the Col1 values is always 'All'. I wanted to default show the Col1='All' values on the graph even when the user selects any other values from the Col1 slicer in the UI i.e. if "ABC" is selected then the Data1 should be filtered for Col1="ABC" but Data2 should be filtered for "All".
Is this possible, any help on how this can be achieved?
Solved! Go to Solution.
Hi @nitinsu
Create a new table
Table new = Table1
Add [Col1] from "Table new" in the slicer.
Create meausres in Table1
SELECTED_Col1 = SELECTEDVALUE('Table new'[Col1]) SELECTED_Col2 = SELECTEDVALUE('Table new'[Col2]) flag = IF ( [SELECTED_Col1] = "ALL", IF ( [SELECTED_Col1] = MAX ( Table1[Col1] ), 1, 0 ), IF ( MAX ( Table1[Col2] ) = "DATA2", 1, IF ( [SELECTED_Col1] = MAX ( Table1[Col1] ), 1 ) ) ) value = SUM(Table1[Col3])
Add [flag] in the viusal level filter as below
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @nitinsu
Create a new table
Table new = Table1
Add [Col1] from "Table new" in the slicer.
Create meausres in Table1
SELECTED_Col1 = SELECTEDVALUE('Table new'[Col1]) SELECTED_Col2 = SELECTEDVALUE('Table new'[Col2]) flag = IF ( [SELECTED_Col1] = "ALL", IF ( [SELECTED_Col1] = MAX ( Table1[Col1] ), 1, 0 ), IF ( MAX ( Table1[Col2] ) = "DATA2", 1, IF ( [SELECTED_Col1] = MAX ( Table1[Col1] ), 1 ) ) ) value = SUM(Table1[Col3])
Add [flag] in the viusal level filter as below
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |