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

Qlikview - calculate graph dimension from list box selection

Greetings, Qlikview gurus!

I've got a page with two graphs on it, Graph A and Graph B, plus a list box with "Period" values in it.

Graph A should show results for whichever period the user selects in the "Period" list box. Graph B should show results for the period exactly one year before the period selected in the "Period" list box.

So, for example, if the user selects a period of "201701" in the list box, Graph A should show the results for "201701".  Graph B should then show results for "201601".

Easy enough on Graph A, but what about Graph B?  I've tried various forms of calculated dimension, but so far, no luck.  Any suggestions?

Thanks in advance!

Joel

2 Replies
vishsaggi
Champion III
Champion III

Can you share your expression for Graph B? And need to know the format for Period field?

= Sum({$< Period = {"= $(=  Date(MakeDate(Year(Date#(Period, 'YYYYMM'))-1, Month( Date#(Period, 'YYYYMM'))),'YYYYMM') "}>} Sales)

aarkay29
Specialist
Specialist

Create variable

vPeriod =Date(ADDYEARS(Period,-1),'YYYYMM')

In chart B

give expression sum({<Period={"$(=$(vPeriod))"}>}Field)