Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm struggling with this problem: I have a stacked bar chart with Year (Stack) and Class (Bar) as dimensions and an expression like this to count deliveries Count(distinct [Deliveries]). It works. Every stack is colored in a specific way (field called Color).
I'm trying to have the same bar chart but I need % values. I tried with this expression Count(Deliveries) / Count(TOTAL <Year> Deliveries) but it doesn't works: I have every stack on value "1". the wierd thing is that if I create a table with that expression... I have the correct % values!
The question is... why?? And... how can I solve it?
Thank you in advance.
Mike.
It should be working - you may check various settings especially the ones how the dimensions are defined because yours shows Year and Class on the bottom ...
It should be working - you may check various settings especially the ones how the dimensions are defined because yours shows Year and Class on the bottom ...
Thank you Marcus, I noticed that the dimension that I identified with "Class" was calculated as "=If(Year<Year(Today()), Class)", if I replace it simply with "Class" it works.
Have you any idea if I wish to keep that formula on dimension?
Thank you
M.
You could try to include the condition within the expression, like:
Count({< Year = {"<$(=year(today()))"}>} Deliveries)