Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Slicer with Measures - Select Multiple

Here's the sitch, I made a measure to track my credit card and bank account balances. I plot them on a line chart and use a slicer to choose the card/account. PROBLEM: I cannot select multiple cards ...
  • v-yingjl's avatar
    6 years ago

    Hello @caseysmith6 ,

    Depending on your description, you can create this measure:

    Balance = 
    VAR _account =
        SELECTEDVALUE ( 'CC Dimension'[Measure] )
    VAR _total =
        CALCULATE (
            SUM ( 'YTD Cash & CC TD'[Paid Amount] ),
            FILTER ( ALLSELECTED ( Dates[Date] ), 'Dates'[Date] <= MAX ( 'Dates'[Date] ) )
        )
    VAR account =
        CALCULATE (
            SUM ( 'YTD Cash & CC TD'[Paid Amount] ),
            FILTER ( ALLSELECTED ( Dates[Date] ), 'Dates'[Date] <= MAX ( 'Dates'[Date] ) ),
            'YTD Cash & CC TD'[Account] = _account
        )
    RETURN
        IF ( NOT ( ISFILTERED ( 'CC Dimension'[Measure] ) ), _total, account )

    blance.png

    Attached a sample file in the next one, hopes to help you.

    Best Looks,
    Yingjie Li

    If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.