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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rohitians
Creator III
Creator III

Year Problem

How can i introduce in the following code the year factor

Thses to expression is calculating quanttity an rate but it shows total...I want for a particular financial year only....

Quantity:

SUM({$<DocumentType_Code={1}>}PurchaseLine_Qty)

Rate:

if(SUM({$<DocumentType_Code={1}>}PurchaseLine_Qty)>0,AVG(Purchaseline_UnitCost),0)

Labels (1)
1 Reply
nirav_bhimani
Partner - Specialist
Partner - Specialist

HI,

Try this Expression.

Current Year Qty:

sum({<Year = {"$(=Max(Year))"},DocumentType_Code={1} >}PurchaseLine_Qty)

Last Year Qty:

Sum({<Year = {"$(=Max(Year)-1)"},Quarter=,Year=, DocumentType_Code={1}}PurchaseLine_Qty)

Regards,

Nirav Bhimani