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: 
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 ?

Labels (1)
4 Replies
tresB
Champion III
Champion III

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.

tresB
Champion III
Champion III

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.