Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 visuals (or candlestick charts in this case) where I need to use columns as my fields in the visualization tab. As it stands, I can filter by location, but I cannot figure a way to filter by type A and type B. This would involve being able to dynamically switch between columns fields using slicers, while ensuring that the right columns go into the correct fields (e.g., I have two options for open that should only go into the open field).
Can anyone help so that I can show all the information in one graph, with a slicer for building, and for Type A/B?
Solved! Go to Solution.
Hi @738o51 ,
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
Proud to be a Super User!
Hi @738o51 ,
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
Proud to be a Super User!
This worked! Thank you so much!
User | Count |
---|---|
98 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
58 |