Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Frank_Fu
Contributor
Contributor

Pivot table order dimension by expression

Hi guys,

 

hope you guys can help me regarding one problem of sorting dimension in pivot table by expression. here is my pivot table:

I would like to order the last dimension - Material based on the measure which is count of batches for the first day - 2019-06-12. Because the date range is dynamic, I used following expression in the "Sort by expression"

AGGR(Count({$<ScheduledDate={"=$(=Date(Min(ScheduledDate),'YYYY-MM-DD')"}>}DISTINCT BatchNumber),Material)

 

Snippet.PNG

 

 

 

 

 

 

 

 

 

 

 

Basically I want materials that have highest count appear first, however it didn't give me the desired ordering for all materials. not sure what was wrong in my expression in set analysis above. any help will be greatly appreciated. Thanks.

 

 

0 Replies