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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
OliviaLai
Contributor
Contributor

Pivot table cannot be changed by multiple date filter

Dear All,

I would like to change the pivot table by year/quarter/moth filter to calculate the past value.

Here's the formula of past value.

sum({<yearmonth.autoCalendar.YearMonth= {">=$(=Addyears(min(yearmonth.autoCalendar.YearMonth),-1))<=$(=Addyears(max(yearmonth.autoCalendar.YearMonth),-1))"}> } ($(=vMetrics)))

 

It  woks only when I choose the yearmonth(value  is not equal to 0).

OliviaLai_0-1637203705088.png

If I choose year, yearquarter and yearmonth together, it cannot work (value is euqual to 0).

OliviaLai_1-1637203737421.png

 

 Can someone help me please. Thank you.

 

Labels (1)
2 Replies
MayilVahanan

Hi 

Try to exclude those fields from the expression and verify it

sum({<yearmonth.autoCalendar.YearMonth= {">=$(=Addyears(min(yearmonth.autoCalendar.YearMonth),-1))<=$(=Addyears(max(yearmonth.autoCalendar.YearMonth),-1))"}, YearField=, QuarterField=> } ($(=vMetrics)))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
OliviaLai
Contributor
Contributor
Author

Hello!

It works! Thank you very much!

Here's my further question

How to revise the growth rate formula?

((Sum({<cust_name = {"=Rank(Sum(z9neta)) <= ($(=vTopValues))"}>} z9neta))/sum({<cust_name = {"=Rank(Sum(z9neta)) <= ($(=vTopValues))"}, yearmonth.autoCalendar.YearMonth= {">=$(=Addyears(min(yearmonth.autoCalendar.YearMonth),-1))<=$(=Addyears(max(yearmonth.autoCalendar.YearMonth),-1))"}>} z9neta))-1