Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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)

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