Forum Discussion

mbosch's avatar
mbosch
Regular Visitor
2 years ago
Solved

How to create dynamic filter to switch different columns

Hello!

 

I would like to create a charts that will look this:

 

How can I do a filter that will switch € to QTY in the three columns?

 

Sales RepSales YTDSales YTD PY variance
Rep110.000€8.000€+2.000
Rep110.000€8.000€+2.000

 

Thank you!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi mbosch ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data.  

    Table (1):

    Table (2):

    (2) We can create a measure. 

    Sales YTD PY Measure = CALCULATE(SUM('Table (2)'[Sales YTD PY]),FILTER(ALL('Table (2)'),'Table (2)'[Sales Rep]=MAX('Table (1)'[Sales Rep])))

    (3) Creating Field Parameter and then the result is as follows.

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

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

3 Replies

    • mbosch's avatar
      mbosch
      Regular Visitor

      Hello!

       

      Thanks for reply.

       

      This is not exactly solving my issue. 

       

      My coulmns YTD sales and YTD Previous Year are two different dimensions. How can I create a filter with a parameter that switches from € to qty if both dimensions are different?

       

      Thank you!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mbosch ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data.  

    Table (1):

    Table (2):

    (2) We can create a measure. 

    Sales YTD PY Measure = CALCULATE(SUM('Table (2)'[Sales YTD PY]),FILTER(ALL('Table (2)'),'Table (2)'[Sales Rep]=MAX('Table (1)'[Sales Rep])))

    (3) Creating Field Parameter and then the result is as follows.

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

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