Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculating Difference

Hi Experts

I am using a Straight table and calculating the difference in Sales

Formula is    Difference = [Last Month Sales] - [Current Month Sales]

Difference is sorted in Ascending order, at the top negative values and below are positive values 

Now in that Chart I want to show only top 20 Negative values

How Shall I do this by using set analysis

Please Suggest

12 Replies
Not applicable
Author

HI Sunny

Unfortunately its not Working, its not bringing up any Values

Actually I am Using this expression in the dimension tab to bring up top 200 customer by sales is there

a way to do this around like Ranking in the script itself or using sum, max (sales)

Please Suggest

sunny_talwar

I am getting a little confused, can you help me understand what your requirement is? and can you also give a representative data where I can implement it which would help you implement in your final version.

Not applicable
Author

HI Sunny

Here Is the Actual Data for one Branch, but I got 152 branches

I want to choose top 200 customers by Sales for each branch for my analysis

for that I am using this expression =aggr(if(rank(sum(SALES))<=200,CUSTOMER),BRANCH,CUSTOMER)

IN Dimensions instead of CUSTOMER to bring top 200 customers by sales for each branch

in expression I am calculating the Last Month SPD ,Current Month SPD and Difference

now my table will show 200 values but I want to show only top 20 lines in the table