Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to create a bar chart but i have three measures, two of which i want as a stacked bar chart and the other a straight bar chart
Example
Year Budget Expenditure Commitments
2015 500000 200000 150000
So in a bar chart I want to see one bar with Budget 500000
In the Second Bar chart I want to see Expenditure and Commitments stacked on top of each other with a different color.for each
Is it possible to do this, or would I just need to create a bar for each?
Hi Ander,
Yes we can do it.
Try creating stacked chart and in expresion use "if condition".
for eg:
Dimension field contains: Budget,Exp,Commi.
Create two expression.
in first exp: write your actual values you want to display.
in second exp: say if(Dimension=Budget,sum(Sales),if(Dimension=exp,0)).
Now like this you can have both stacked and single bar in same chart.
Hope it helps.
Regards
KC
Thanks, looks good, but i will have a look at this and advise
Thanks, will have a look at this as well
Cool DataNibbler , if we have limited set of values in the Dimension this work perfectly fine
I feel if we have more values in the dimension and if we want it to be dynamic then we might think , thanks for the sample file
please check the attached file
Good way , but I prefer the other option by DataNibbler
Hi Avinash,
I don't quite get you. More values in the dimension should not be a problem in itself, but I don't quite understand what you mean with it being dynamic? Do you mean the dimension being dependent on some condition?
Best regards,
DataNibbler
My point is in order to get the stack we are writing this
= IF(Dim_2=1, Expr_1) , = IF(Dim_2=1, Expr_2) and = IF(Dim_2=2, Expr_3)
expression rite. so if a new value called 3 gets added for the Dim_2 dimension than? we need to add one more expression rite? this was my point
Hi Avinash,
sure! With one more value to that secondary dimension, I'm not sure what would happen or what we could do.
In fact, that secondary dimension is (in my example) not a functional part of anything, it's just a trick (and thus completely arbitrary and artificial) to enable the part_stacking_part_grouping of the expressions.
Best regards,
DataNibbler
Hi
I have one question though. I understand exactly what you are doing. My issue though is I have the Dim2 Data in the same row as the Dim1 Data. I am just stuck finding my way around it. See attached summarised Data example