Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
deniscamh
Creator
Creator

Rolling X Months does not work with value list

Hello Community,

I have a variable that creating conditions for rolling x Months

Looks like this:VRollMonth = [Survey Year]=,[Survey Month]=,[Survey Date]= ,[Survey Month Year]={">$(=monthend(AddMonths(Max([Survey Date]),-$(vNumRollinMonth))))<=$(=Max([Survey Date]))"}

When vNumRollinMonth it the number that user can change to choose how many months back they want to go.


Then I create bar chart with [Survey Month Year] as dimension one and Dealer Code as Dimension two.

My expression is like this sum({<$(vRollMonthCSE)>}(msrConvenienceIndexQuestionPoints1)). and this works fine when I choose any Months the chart displays all the data by Months based on vNumRollinMonth that user chooses..

not value list.PNG




But I need to create a chart with second dimension as Value list.

So my chart will be: First dimension: [Survey Month Year] , second Dimension: ValueList('All','Dealer Zone') and the measure is

if(ValueList('All','Dealer Zone')= 'All', sum({<$(vRollMonthCSE)>}(msrConvenienceIndexQuestionPoints1)),

if(ValueList('All','Dealer Zone')= 'Dealer Zone',sum({<$(vRollMonthCSE)>}(msrConvenienceIndexIndexScore)))).

But in that case when I choose a month the chart shows only the selected months and does not show all the other months form the selected back based on vNumRollinMonth .

value list.PNG

Any Ideas why?

Please help


16 Replies
sunny_talwar

Awesome !!

Please close the thread by marking correct and helpful responses once you have confirmed.

Best,

Sunny

deniscamh
Creator
Creator
Author

Will do

deniscamh
Creator
Creator
Author

Hi Sunny,

Just wanted to thank you for your help.

It is not the first time you are helping me and it always very efficient.

Thank you a lot!!

sunny_talwar

No problem at all!! I am glad I am there to help most of the times

deniscamh
Creator
Creator
Author

Thanks Sunny,

I have one more question related to this.

I have added this expression in a color by expression function

if(ValueListDealerZone='All',Red(),blue())

and it works as long as I do not select Month.

When I select Month it turns all to blue except for selected month.

Is there any way to fix that the formula does not reflect the month selection?

Colors problemv1.PNG

sunny_talwar

Apply the same logic here as well

If(Only({<$(vRollMonthCSE)>} TOTAL <ValueListDim> ValueListDim) = 'All', Red(), Blue())

deniscamh
Creator
Creator
Author

You are rock!

Thank you!!!!!