Forum Discussion

quikin5's avatar
quikin5
Frequent Visitor
5 years ago
Solved

Exclude a visual from a certain value in slicer

Hi,   I have a slicer and a clustered bar chart affected by this slicer. The slicer affects the bar chart axis. Suppose the slicer has three items (and thus the bar chart has three bars).   I wa...
  • v-kelly-msft's avatar
    v-kelly-msft
    5 years ago

    Hi  quikin5 ,

     

    Create a measure as below:

    Measure = 
    var _tab=EXCEPT(ALL('Table'),ALL('Table (2)'[State]))
    Return
    IF(MAX('Table (2)'[State]) in FILTERS('Table'[Name]),CALCULATE(SUM('Table (2)'[Score])),
    IF(MAX('Table'[Name]) in _tab,CALCULATE(SUM('Table (2)'[Score]),FILTER(ALL('Table (2)'),'Table (2)'[State]=MAX('Table (2)'[State])))))

    And you will see:

    For the related .pbix file,pls see attached.

     

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!