Forum Discussion

leeham's avatar
leeham
Frequent Visitor
4 years ago
Solved

dynamic chart to allow multiple selections from two (or more) slicers

hi,   I am having trouble being able to select multiple options from a slicer and this being recognised in measure and then a line chart that feeds off of the output. I have been successful with t...
  • johnt75's avatar
    4 years ago

    Instead of SELECTEDVALUE you need to use VALUES, and because that returns a table you need to use IN instead of =, e.g.

    bal num =
    VAR slicer1 =
        VALUES ( table1[status_now] )
    VAR slicer2 =
        VALUES ( table1[status_prev] )
    RETURN
        CALCULATE (
            SUM ( table1[balance] ),
            table1[status_now] IN slicer1,
            table1[status_prev] IN slicer2
        )