Discussion Board for collaboration related to QlikView App Development.
Hi, I could use some help from this expert community. I'm trying to make a barchart that would display the following values based on a MonthYear dimension in my dataset:
1) Current Month
2) Prior Month
3) 2 mos Prior
4) Year Prior
5) A user inputted/adjustable Baseline period
These values should all adjust as the user selects a new month.
An example of the Dimension I would like to have if the current month is November
Format I would want the barchart to look like:
Any help you could provide would be greatly appreciated. Thanks!
Go to Solution.
Well, you can create the calculated dimension as follows:
Create the following variable, and then add the Calculated dimension.
vMaxDateSelected = Date(Max(DateField));
=IF(DateField <= AddMonths('$(vMaxDateSelected)',-2), 'M-2',IF(DateField <= AddMonths('$(vMaxDateSelected)',-1), 'M-1',IF(DateField <= AddMonths('$(vMaxDateSelected)',0), 'Current Month')))
Hope that helps,
View solution in original post
Thanks! Yeah I was able to get it working using a combination of a baseline variable and a 4 month string variable that is created based on the max month-year available. Maybe not ideal, but it is running well so that solves the problem at least.