Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
Hope this helps.
Ryan
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)
)
)
Instead of .25, you can put .10 or whatever top-X% you need to display.
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.
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..
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.