Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello to everybody,
I had a bar chart, with one data dimension "[Purchase_Order_Date.autoCalendar.YearMonth]"
and one measure
=COUNT(Resultado)/COUNT(TOTAL <[Purchase_Order_Date.autoCalendar.YearMonth]> Resultado)
As you can see in the image, the graph shows the percentage of each YearMonth, inside each YearMonth, so each YearMonth always is 100% adding the 3 options.
Later I add variables to this Bar Chart (something I done before), in order to give users the possibility to explore this bar chart with differente date dimensions.
The variable is declare with this code:
set vTipoDimensionFecha = string;
and I allow the user to choose the value of the variable with these graph object:
But the problem in this case is that the measure is not doing which I intend, which is to calculate the % of each option inside particular dates, for example YearQuarter, YearWeek, etc.
I tried differente formulas for the measure but all of them fail:
=COUNT(Resultado)/COUNT(TOTAL <$(vTipoDimensionFecha)> Resultado)
//=COUNT(TOTAL <$(vTipoDimensionFecha)> Resultado)/COUNT(TOTAL <$(vTipoDimensionFecha)> Resultado)
//=COUNT(Resultado)/COUNT(TOTAL <[Purchase_Order_Date.autoCalendar.YearQuarter]> Resultado) --the same used before
As you can see in this image, instead of calculate the % inside each yearquarter, it did for the total.
I guess that the problem has to be in the measure code, but I´m not sure,
Any ideas?
Thank you in advance
if you use $(vTipoDimensionFecha) as your date dimension as well the bar chart should adjust. and if you are already doing that then theres something else causing the issue. maybe post some sample data