Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kruel830
Contributor II
Contributor II

IFs in dimensions

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

But when I combine them to same line chart and use filter pane to change the dimension, the result is unwanted:

graph2.jpggraph3.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?

0 Replies