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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grand total on FirstSortedValue of Qlikview Pivot table

Grand Total on "FirstSortedValue" calculation is incorrect.qv2.JPG

This should display value as 99,109 instead of 20.

2 Replies
Anil_Babu_Samineni

Seems, You are talking about FirstSortedValue() right? Can you share the expression

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

here is the expression in summary tab. where the volume is off by 10,000

because 767924 Material is displayed as 0 instead of 10,000 . Please find attached report.

sum(aggr(if (sum(Quantity_Billed_KG) > 0,

FirstSortedValue(distinct Aggr(

sum({<Valid_From_Date_Master = {"<=$(vEndDate)"},Valid_To_Date_Master = {">=$(vEndDate)"}>} Quantity_Billed_KG)

,Sold_To_Customer_Code,Material_Code,End_Use_Customer_Code,Customer_Group_Code,TX_Currency_Code,Volume_Tier,Created_On_Date),-Created_On_Date),

sum(Quantity_Billed_KG)),

Sold_To_Customer_Code,Material_Code,End_Use_Customer_Code,Customer_Group_Code,TX_Currency_Code,Volume_Tier))