Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Change column value in chart visual using slicer

Hi PBI community,   I'm hoping you can help me solve a problem.    As shown in the pbix here: https://www.dropbox.com/s/owfkp1lqdwcusqo/Candlestick%20Question.pbix?dl=0 I have two bar graph visu...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

     

    1. Created a new table with a column named "slicer" like the below screenshot with 2 values "AAA' and "BBB".

    2. Created 4 measure like below:

    Close Measure = IF(MAX('Table'[Slicer]) = "AAA",CALCULATE(SUM('Sample'[A Close])),CALCULATE(SUM('Sample'[B Close])))
    
    High Measure = IF(MAX('Table'[Slicer]) = "AAA",CALCULATE(SUM('Sample'[A High])),CALCULATE(SUM('Sample'[B High])))
    
    Low Measure = IF(MAX('Table'[Slicer]) = "AAA",CALCULATE(SUM('Sample'[A Low])),CALCULATE(SUM('Sample'[B Low])))
    
    Open Measure = IF(MAX('Table'[Slicer]) = "AAA",CALCULATE(SUM('Sample'[A Open])),CALCULATE(SUM('Sample'[B Open])))

    3. Put these 4 measures into the chart, then you will get

    Hope this is what you want, please try.

     

    Aiolos Zhao