Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem with the range

Hi Genuises,

I have a chart in which I have Customer Code, Local Cargo Throughput

Expression as Sum(Cargo_thruput)

Below is the image of the chart attached

Please open the image and then go thru the below problem

So if you see I have range for Local CArgo throughput which is 1-300000 and >300000 these ranges are coming from an excel files

Now when I am doing the Sum(Cargo_thruput) in whichever range it will lie it has to be there in image case if you see Customer Code= CSTEINWEG  SUm is 4255376 but it is lying in both the places 1-300000 and >300000  , I need that it will lie only to >300000 and the other row will be eliminated

Please look only for CSTEINWEG 

Fast help will be appreciated as I have to deliver it in 2 hours

Thanks in advance

S

12 Replies
jvishnuram
Partner - Creator III
Partner - Creator III

Hi Shashank,

If possible could you please post your sample application., because that will helpful to play around.

Not applicable
Author

Can you please attach a sample app for this. This will help you give faster feedback from community

iktrayanov
Creator III
Creator III

Instead of using Local Cargo Throughput from Excel use a calculated dimension like

If(Sum(Cargo_thruput)<=300000,'1-300000','>300000')

Anonymous
Not applicable
Author

Attached is the sample app

here the Customer Code =CSTEINWEG Sum(Cargo_thruput) is 52180 so it should lie in the range 1-300000 and the other range should be removed

Anonymous
Not applicable
Author

I have to take the ranges from the excel because each time these ranges will be changed by the client

jvishnuram
Partner - Creator III
Partner - Creator III

Hi,

Find the attchment and this is the change

=If(Aggr(Sum(CARGO_TONNAGE),[Local Cargo Throughput])<=300000,'1-300000','>300000')

Anonymous
Not applicable
Author

Hi Vishnu,

Thanks for the quick response, but real problem is that these ranges are coming from excel which will change each quarter and there are 100 of ranges, you are only able to see two ranges as I have loaded only one excel

Thanks,

S

MK_QSL
MVP
MVP

are the ranges symmetrical?

If yes, you can use class function...

=Replace(Class(Aggr(Sum(CARGO_TONNAGE),[Customer Code]),3000000),'<= x <','-')

Not applicable
Author

Hello,

Can you please find the attachment. It will make the stuff more dynamic. But for now I have added that in expression, you can play around with this approach further.

Hope it is helpful.

Thanks,

Angad

P.S :

In the Flag expression please use below:

if(not isnull([Local Cargo Throughput]),if(Sum(CARGO_TONNAGE)>= LowerRange and Sum(CARGO_TONNAGE) <= UpperRange,1,0))