Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Variable in Pivot Chart

Hi everyone,

I am in trouble with variable. I create "vPriorYear" variable and put it into Expression of Pivot Chart on the following statement:

Num((Sum(NetSalePerDate)-Sum({<Year={$(vPriorYear)}>} NetSalePerDate))/Sum({<Year={$(vPriorYear)}>} NetSalePerDate)*100,'#.#')&'%'

But it is not work. However, it's work in the Text object . I really misunderstand that why this wrong measure in Pivot Chart ?

Anybody can please help me, please? I will attached my qvw file as below

3 Replies
Gysbert_Wassenaar

You're using Year as a dimension in your pivot table. Because of that your pivot table is limited to values from 2016. There are no values in 2016 where the year value is 2015 so you don't get any result with the set modifier Year={$(vPriorYear). If you remove the Year dimension from the pivot table you'll get results as long as you don't choose Date as Time Option. Then you're stuck with values from only 2016 again.


talk is cheap, supply exceeds demand
Not applicable
Author

Thank you for your reply, gwassenaar‌. But I want to use Year Dimension in this table, Can you give me another solution for this, please?

Gysbert_Wassenaar

The As-Of Table


talk is cheap, supply exceeds demand