Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Choosing Max 200 in Expression

Hi Experts

I have  an Calculated Expression  in a straight Table [Last Month sale] - [Current month sale]

Now I want to choose only top  200 values based on my Customer Number dimension

Please Suggest

10 Replies
PrashantSangle

Hi,

In Straight table->property->Dimension Limit->Restrict data->Show Largest enter 200

Or

You can use Rank() also.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
prajapatiamar38
Creator II
Creator II

Hi...

Try like this expression.

=IF(Aggr(Rank([Last Month sale] - [Current month sale]),CustomerNo)<=200,([Last Month sale] - [Current month sale] ))

I hope this will help you

Thanks

Not applicable
Author

HI Max

I am calculating Drift  the formula for  that is [Last Month sale] - [Current month sale]

So i want Max 200 in Drift

Anonymous
Not applicable
Author

Hi,

You can do this using Dimension Limits. First sort your expression and make sure your expression is given the first priority. Then go to Dimension Limits tab and select Largest 200.

dimensionlimits.png

Not applicable
Author

HI Amarnath I am getting Null Values for all

IAMDV
Luminary Alumni
Luminary Alumni

Is [Last Month sale] and [Current month sale] fields or expressions?

PrashantSangle

Hi,

You want top 200 Customer Number which have max drift

Then try my earlier solution or you can also try Amarnath Solution.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

HI Deepak

[Last Month sale]  is a Calculated Field

[Current month sale] is also a  Calculated Field

Now I want to Calculate another field Drift 

the formula for  that is [Last Month sale] - [Current month sale]

Not applicable
Author

Hi Max I tried it

But not  able to get the desired result