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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
md_qlikview
Creator II
Creator II

Prior Year Calculation Issue

Hello All,

I was trying to build an expression to calculate Prior Values. I.e. Currently One of the column in my table is showing current quarters sales.

I wanted to add one more column next to that, which gives sales of last years quarter and this value will be changed based on the users selection. Eg. User has selected last quarter of current year then my Prior Value column should show values from last quarter of the last year. But I am not getting the correct numbers.

Kindly Help me out to get it right.

My Current Expression -

(sum({<Region={'Americas'}, DATE={">=$(=Date(QuarterStart(addyears(MIN(DATE),-1)),'DD/MM/YYYY'))<=$(=Date(QuarterEnd(addyears(MIN(DATE),-1)),'DD/MM/YYYY'))"},

  [Product Line]=>}Original_Value)

Thnx In Advance

5 Replies
md_qlikview
Creator II
Creator II
Author

Forgot to mention that my default selection on the tab is current year and user can switch to different quarters of the current year and also can select any year to calculate sales within the quarters of current selected years and last year

md_qlikview
Creator II
Creator II
Author

still awaiting...........

sasikanth
Master
Master

HI,

need to check the Date formats  otherwise Expression seems to be fine ,

can you share your application?

md_qlikview
Creator II
Creator II
Author

Hi Sunny,

Thnx for your reply. Sorry I could not catch you on time. I worked around for that and eventually I got the correct calcuations. And as you said expression was right, just it was needed some date filters to be nullified.

mightyqlikers
Creator III
Creator III

hi,

in calendar object create quarter wise and map that date to the calendar object via date field.

and try.

Regards

$@M