Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate Revenue of the top 10% PERCENT

Hello Qlikers,

In a straight table, I have a dimension such as

Quartername([date])

and for the expression, I hope to perform a calculation that shows the % of revenue contributed by the top-10%-revenue customers (the top 10% customers in that quarter since the table has the quartername as the dimension).

I have been considering the function rank and fractile but couldn't get this an expression without error.

One problem that makes this a bit more difficult is that revenue is calculated using set-analysis so: sum({<demension1={'xxx'}>}revenue)

I got some ideas from https://community.qlik.com/thread/50818and Getting the top 10% of a list | Qlik Community

I am open to all ideas, thanks, guys!!

Samuel

6 Replies
Not applicable
Author

Hello Samuel,

Hope this is what you're looking for.

On editing the app, click on the Dimension (this case its Brand) and use the Limitation Function, by default its set to "No Limitation", but you may opt to change it to "Relative Value", then select "<=" from the Options and type 10% in the box below it, just ensure that by order of arrangement the first  Measure after all the Dimension/s is "Revenue" (this case it SALES TY), uncheck "Show Others" to hide > 10% Revenue.

Limitation.png

Hope this helps.

Ryan

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi Samuel,

You'll need to use accumulation. Can you see if this works?

if(

(

rangesum(above(sum(sales),0,RowNo()))

/

sum(TOTAL sales)

)

<=.25,

(

rangesum(above(sum(sales),0,RowNo()))

/

sum(TOTAL sales)

)

)

karthiksrqv
Partner - Creator II
Partner - Creator II

Instead of .25, you can put .10 or whatever top-X% you need to display.

samuel_lin
Creator
Creator

Hi Karthik,

I think you solution might work, but where does it reference the customers? I would like to get the top 10%customers' revenue comparing with the total revenue.

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi Samuel,

Customers would be a dimension am guessing. The above expression assumes that you want to display ONLY the customers who contribute to the top X% in revenues. Please let me know if there are any other considerations that need to be handled here..

samuel_lin
Creator
Creator

Hi Karthik,

As I mentioned in the original discussion post, the dimension is quartername([order date])

Thank you for your help thinking through this together!! really really appreciate it.