Forum Discussion
Always show certain data in a Graph despite slicer selection
The solution I have in mind is:
- Two slicers: one for "BG", one for "Plant"
- The result (table or graph) should always display the target records despite the value of the slicer.
Data Structure
BG | Plant | Saving | Target | year
------------------------------------
A1 | B1 | 200 | 0 | 2023
A 2 | B2 | 200 | 0 | 2024
etc.
Target | Target | 0 | 105 | 2023
Target | Target | 0 | 205 | 2024
What I did already
First, for the slicers I made a separate table using DAX storing the BG and Plant. This table (called "Table1") has no relation with my main table
Second: Added a measure to my main table. If the value for the plant record is "Target" the 1 otherwise 0. This this for both the "Plant" and "BG" field.
Result
BG | Plant | Saving | Target | year | filter_plant | filter_bg
--------------------------------------------------------------------
A1 | B1 | 200 | 0 | 2023 | 0 | 0
A 2 | B2 | 200 | 0 | 2024 | 1 | 1
etc.
Target | Target | 0 | 105 | 2023 | 1 | 1
Target | Target | 0 | 205 | 2024 | 1 | 1
1 Reply
- amitchandak
Super User
IwanVB , Try like
Countrows(filter(Table1, Table1[Plant] IN VALUES('category list'[Plant]) || Table1[Plant] = "Target"))+0
or
Switch(True(),
max(Table1[Plant]) IN VALUES('category list'[Plant]) || max(Table1[Plant]) = "Target", 1,0)+0