Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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 Fix...
  • Russell-PBI's avatar
    4 years ago

    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.