Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a bar chart that switches views between Region and Product and is drawing the chart as:
Sum({<Period=, Region=, Product=>} Sales)
Then I use the ColorMix to draw selections as green and unselected as grey:
If(Period=Period, ColorMix, Grey)
The problem occurs when I'm switching between Region and Product. If I select Region A as an example, the bar chart will color the selection properly. But when I switch to the Product view, it's showing me all Products that are associated to Region A instead of Products sold within Region A (Sorry if that's a bit confusing).
In other words... the amount of green should stay the same in both views.
I've tried to use:
Sum({<Period=, Region=P(Region), Product=P(Product)>} Sales) in the ColorMix, but that didn't work, so I'm a bit stumped at solving this.
I've attached a couples pictures of my problem.
And some sample data if you'd like to have a go at it:
Region | Product | Amount |
A | Fruits | 1 |
A | Vegetables | 2 |
A | Meat | 3 |
B | Fruits | 4 |
B | Vegetables | 5 |
C | Meat | 6 |
C | Vegetables | 7 |
Thx!
How do you switch "views"? Is it period that is your dimension?
I have Period as my first dimension and then Region, Product, or Store as my second dimension.
I have a variable vCycle that I use it as a condition on my dimensions to turn them on/off.
vCycle = 1 is Region
vCycle = 2 is Product
vCycle = 3 is Store
So when I click a button titled Region, it performs an action to change vCycle to 1 and will show me sales by Region.