Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
erictanzh
Contributor III
Contributor III

Top 3 Clients across countries in Qlik Sense Straight Table

Hi all,

I'm attempting to plot a straight table visualization to display the top clients based on their values and volumes across countries. My data is accumulative, and my intention is for the data to auto reload from the latest month's worth of data.

erictanzh_0-1643277647700.png

I'm currently stuck with this expression - Sum( Aggr(If(Rank(Sum(AUD_AMT), 1) <= 3, Sum(AUD_AMT)),outwardSeller, max(outMonthYear) ,cs.clientCode )

PS - I've attached a simple mock data for ease of referencing

 

1 Solution

Accepted Solutions
MayilVahanan

hi Eric,

Based on ur sample data, its contains only one date , so do you want to add Max date in ur expression?

 

MayilVahanan_0-1643355079287.png

If so, try like below

If(Rank(Sum({<pymtDate={"$(=Date(Max(pymtDate),'M/D/YYYY'))"}>}pymtAUD))<=3, Sum({<pymtDate={"$(=Date(Max(pymtDate),'M/D/YYYY'))"}>}pymtAUD))

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
MayilVahanan

HI Eric,

Its works fine. Can you say the issue in details if I missed out

MayilVahanan_0-1643279459977.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
erictanzh
Contributor III
Contributor III
Author

Hi Mayil,

This does work, but I'm planning to only factor in the current month sales/volumes. How would we add in the MonthYear variable in?

MayilVahanan

hi Eric,

Based on ur sample data, its contains only one date , so do you want to add Max date in ur expression?

 

MayilVahanan_0-1643355079287.png

If so, try like below

If(Rank(Sum({<pymtDate={"$(=Date(Max(pymtDate),'M/D/YYYY'))"}>}pymtAUD))<=3, Sum({<pymtDate={"$(=Date(Max(pymtDate),'M/D/YYYY'))"}>}pymtAUD))

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
erictanzh
Contributor III
Contributor III
Author

Thanks Mayil,

My actual data will span across 3 years, and I'm looking to sum an entire month's worth of data for this Proof-of-Concept. Your solution is a good guide for me to expand upon this intention.