I recently had the idea to create a dual axes bar graph that would show the total of some measure, and when a filter was selected, the total would remain in the view but the main bar would be filtered to show the desired dimension.
I had the chance to try it out today and it was relatively easy to make using a simple LOD calculation. First, bring your measure onto columns and a dimension onto rows. I used the superstore data and used sales and states, respectively. I then used the Product Category for the filter. The way the graph works is by creating a dual axes of two identical bar graphs on top of each other. Then, make the bar in the background transparent (I also gave it a border). Then apply a LOD calculation to the bar in the background so that it will not be filtered by product category. My calculation was {Fixed [State]: sum(sales)} This calculation will sum sales per state, but the dimension filter will not filter the sales by category. If you are unfamiliar with LOD calculation and how they are impacted by filters, I would recommend reading this short page: Link. Rather than a quick filter I used a dashboard action filter, but either would do. The result of the filter is showing category of interest as an opaque bar and the remaining sales as a transparent bar. Let me know what you think! Corey
0 Comments
Leave a Reply. |
AuthorCorey Jones | @coreyj34 Archives
December 2018
Categories |