Forum Discussion

ewwpoewpeoweo's avatar
ewwpoewpeoweo
New Member
2 years ago
Solved

Create slicer based on measure

Hi, all!

I stacked with a problem, need some hints

Have two tables (see below) in my Data Model. I need to create measures that calculate Value Sales and displays value based on currency selected (Currency slicer) in Matrix with values sales for for every Segment. Any ideas? Thanks!
1) 

2) 

 

  • Try something like this:

    Step one: create a little table called 'Currency' with one column and with one line per each currency you need.

    Step two: create this measure

    Amount =
    SWITCH(
        TRUE(),
            SELECTEDVALUE('Currency'[Currency])="EUR",sum('Table'[EUR]),
            SELECTEDVALUE('Currency'[Currency])="CHF",sum('Table'[CHF])
    )
    Step three: add the Currency table column as a slicer
    Step 4: insert the measure

3 Replies

  • AliceW's avatar
    AliceW
    Power Participant

    Try something like this:

    Step one: create a little table called 'Currency' with one column and with one line per each currency you need.

    Step two: create this measure

    Amount =
    SWITCH(
        TRUE(),
            SELECTEDVALUE('Currency'[Currency])="EUR",sum('Table'[EUR]),
            SELECTEDVALUE('Currency'[Currency])="CHF",sum('Table'[CHF])
    )
    Step three: add the Currency table column as a slicer
    Step 4: insert the measure
    • AliceW's avatar
      AliceW
      Power Participant

      You're very welcome!

      It's something I use in nearly all my reports, and it's so popular with everyone 🙂