Forum Discussion
Retaining certain values so they can be compared against
Hello,
I'm trying to get certain values to remain within a chart with others being optional to add or remove via a slicer.
My data looks like this:
| Area | Data 1 | Data 2 | Data 3 |
| Fixed area 1 | 123 | 325 | 3221343245 |
| Fixed area 2 | 3214 | 3522634 | 3221512 |
| Fixed area 3 | 324 | 342 | 32532 |
| optional area 1 | 3245 | 3254623 | 3253 |
| optional area 2 | 342 | 23423 | 32432423 |
Is it possible to keep fixed areas 1, 2 and 3 to remain so the user cannot remove them while optional areas 1 and 2 can be changed?
Thanks in advance for your help!
Hi Anonymous, try this: https://drive.google.com/file/d/1-2UHhq7J4C5Y0csqQCrr3nJMhX12DJVt/view?usp=sharing
Add a new flag to identify the fixed areas and add a new table for just the optional area values, then use the 'Show Area' measure as a 'greater than 0' filter on your visual:
Show Area =
CALCULATE(
COUNTROWS('Table')
,'Table'[Fixed Flag] = TRUE()
|| ISFILTERED('Optional Area'[Optional Area]) = TRUE()
&& 'Table'[Area] IN ALLSELECTED('Optional Area'[Optional Area])
, 'Table'[Area] = SELECTEDVALUE('Table'[Area])
)Feels fairly wonky, but if it works, it works. Remember to lock and hide the filter, so it can't be removed.
4 Replies
- Russell-PBI
Resolver II
Hi Anonymous, try this: https://drive.google.com/file/d/1-2UHhq7J4C5Y0csqQCrr3nJMhX12DJVt/view?usp=sharing
Add a new flag to identify the fixed areas and add a new table for just the optional area values, then use the 'Show Area' measure as a 'greater than 0' filter on your visual:
Show Area =
CALCULATE(
COUNTROWS('Table')
,'Table'[Fixed Flag] = TRUE()
|| ISFILTERED('Optional Area'[Optional Area]) = TRUE()
&& 'Table'[Area] IN ALLSELECTED('Optional Area'[Optional Area])
, 'Table'[Area] = SELECTEDVALUE('Table'[Area])
)Feels fairly wonky, but if it works, it works. Remember to lock and hide the filter, so it can't be removed.
- AnonymousNot applicable
Thank you so much! Is there any way you could share the pbix file? I'm struggling to replicate
- Russell-PBI
Resolver II
Check out the link in my post 😉