Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
TarekHajji
Contributor II
Contributor II

top 1 product by quantity in a line chart

Hello

 

using a line chart, i want to show the product quantity per month, just for the product has the top quantity

I used the below expression to get the top 1 product by quantity ; 

FirstSortedValue(PRODUCT_NAME, -aggr(sum(QUANTITE_REALISE), PRODUCT_NAME))

and its work correctly 

TarekHajji_0-1587828805132.png

 but when i want to show this product's quantity by month in a line chart , using the bellow expression the result is 0

 

sum({<PRODUCT_NAME={'FirstSortedValue(PRODUCT_NAME, -aggr(sum(QUANTITE_REALISE), PRODUCT_NAME))'}>}QUANTITE_REALISE)

 

Any help please

 

Thank you

 

Labels (2)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Bonjour Tarek,

there's an error in the expression, maye be :

=sum({<PRODUCT_NAME={"$(=FirstSortedValue(PRODUCT_NAME, -aggr(sum(QUANTITE_REALISE), PRODUCT_NAME)))"} >}QUANTITE_REALISE)
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

Bonjour Tarek,

there's an error in the expression, maye be :

=sum({<PRODUCT_NAME={"$(=FirstSortedValue(PRODUCT_NAME, -aggr(sum(QUANTITE_REALISE), PRODUCT_NAME)))"} >}QUANTITE_REALISE)
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
TarekHajji
Contributor II
Contributor II
Author

Thank you,

it's working .