Hello,
I have a problem with if statements in dimensions. I would like to switch between actual numbers from the last 12 months and rolling 12 months figures. If statements work with KPIs and gauges, they don't work with charts.
Working graphs look like this:
![graph1.jpg](/legacyfs/online/213093_graph1.jpg)
But when I combine them to same line chart and use filter pane to change the dimension, the result is unwanted:
![graph2.jpg](/legacyfs/online/213096_graph2.jpg)
![graph3.jpg](/legacyfs/online/213094_graph3.jpg)
My dimension-if is: =if(vR12='1', CumulativeMonth, VoucherYearMonth) and if in measure is:
if(vR12='1', $(vSales), $(vSales12)). I assume the problem is CumulativeMonth-dimension, as it looks 24 months behind. But is there any workaround to solve this?