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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
p_andreev
Partner - Contributor III
Partner - Contributor III

FirstSortedValue and total in a pivot

Hi everybody,

Could someone help with the following issue:

I have this expression -

Rangesum(FirstSortedValue({$<Year=,Month=, Day=, ItemAndDayYearMonth={"=$(=Max({$<ItemAndDayYearMonth={'<=$(=Year(Max(Date))*100+Num(Month(Max(Date))))'}>} ItemAndDayYearMonth))"}>} ItemCostValue/Rate,-Date))

and I can't get a total on this column in a pivot. Is the problem in FirstSortedValue or Rangesum function ?

4 Replies
tresesco
MVP
MVP

Remove rangesum(), and try like:

FirstSortedValue({$<Year=,Month=, Day=, ItemAndDayYearMonth={"=$(=Max({$<ItemAndDayYearMonth={'<=$(=Year(Max(Date))*100+Num(Month(Max(Date))))'}>} ItemAndDayYearMonth))"}>} ItemCostValue/Rate,-Date)

p_andreev
Partner - Contributor III
Partner - Contributor III
Author

Yes, I have tried this and unfortunately it does not work.

tresesco
MVP
MVP

Can you share your sample qvw?

p_andreev
Partner - Contributor III
Partner - Contributor III
Author

tresesco, thank you for your willingness to help.

I found a solution including the above expression in Aggregation at the lowest level of the dimensions.

Have a nice day.