Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Top customers on basis of percentage % ?

HI All,

I need to get top 25% of customers, on the basis of percentage from the Total Sales Value..

The customers who has having Sum of top % should be <= 25%, Required in PIVOT Table..

Kindly find the sample excel file along with the Input & Output..

Kindly help me on this.

Thanks,

Helen

7 Replies
MVP
MVP

Re: Top customers on basis of percentage % ?

Helen, do you really need a Pivot table?

If a straight table will do, you can use the dimension limits:

Top25.png

Not applicable

Re: Top customers on basis of percentage % ?

Hi Swuehl,

Thanks.. But I really need in PIVOT Table .

Kindly help me on this..

Regards,

Helen

MVP
MVP

Re: Top customers on basis of percentage % ?

Attached a script based solution (since you asked in script section of the forum ;-) and a pivot table chart showing the requested result.

Not applicable

Re: Top customers on basis of percentage % ?

Thanks swuehl exactly what i need.

Is it possible to create on Sale Value other than Sales %, Can't we do it in Front End Chart with the help of Variables using Rangesum which used in backend ?

Regards,

Helen

MVP
MVP

Re: Top customers on basis of percentage % ?

Helen,

attached another version where I calculate the sales % in the script as well as a purely front end solution using rangesum.

Not applicable

Re: Top customers on basis of percentage % ?

Thanks swuehl.

Here it is working fine In my case it was not working.

I need to show show top25% customers in the Year 2015 in Calc dim, with the bifurcation of 2016 Sales for that specific customers.

In the Excel file haven't provided 2016, can you Include for 2016 sales & can you show

Kindly help me on this.

Regards,

Helen

vsudhakar
Contributor III

Re: Top customers on basis of percentage % ?

sum(sales)/sum(total sales)