Forum Discussion

hctrgrc's avatar
hctrgrc
Frequent Visitor
2 years ago
Solved

Using a slicer to show a specific column in matrix visual

Hello, I'm new to Power BI and I've recently come across a scenario where I have two sales columns, each one is a different currency. I would like to have a matrix visual and a slicer on top where yo...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi hctrgrc ,

    You have the right idea!

    The Table data is shown below:

    Please follow these steps:

    1. Use the following DAX expression to create a measure

    Sales = 
     VAR _a = SELECTEDVALUE('Table 2'[Currency])
     VAR _b = IF(_a = "USD",SUM('Table'[Sales for USD]),SUM('Table'[Sales for MXP]))
     RETURN _b

    2.Final output


    Best Regards,
    Wenbin Zhou
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.