Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Daryn
Creator
Creator

What % of total sales is the number one product

Hi all,

Thanks in advance for taking the time to read this and propose a solution if possible.

I am trying to show as a %, the top selling product of all sales. I thought the below was right, but shows as 0.

 

=(Sum({<[Prod_series]={"$(=FirstSortedValue({<[Prod_series]={"1"}>}))"}>}[NETWR]) /  Sum([NETWR])) * 100

 

Looked so simple, yet here I am, stuck!

I also tried with rank as well, I don't mind which solution someone provides.

Thanks as always,

Daryn

Labels (1)
1 Solution

Accepted Solutions
Chirantha
Support
Support

Please see if this helps

=Sum({<Prod_series={"$(=FirstSortedValue(Prod_series, -aggr(Sum(NETWR), Prod_series)))"}>} NETWR) / Sum(TOTAL NETWR)
 

View solution in original post

2 Replies
Chirantha
Support
Support

Please see if this helps

=Sum({<Prod_series={"$(=FirstSortedValue(Prod_series, -aggr(Sum(NETWR), Prod_series)))"}>} NETWR) / Sum(TOTAL NETWR)
 

Daryn
Creator
Creator
Author

Thank you Chirantha, I just had to add NUM at the start and ,'0.0%' at the end, as it wasn't displaying properly as a %.

But your solution was prefect apart from that 👍.  Really appreciate your time and knowledge.

Regards Daryn