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

If Condition?

Hi,

I am trying to created a bucket but it's not working as I thought.

The idea is set ranges, but not excluding the other options. For example, I have a field called Days I have set the following:

If (Day =< 30, '1 to 30 Days',

If (Day > 30, '30 + Days',

If (Day > 45, '45 + Days',

If (Day > 60, '60 + Days',

If (Day > 90, '90 + Days',)))))

The problem here is if I want to have all above 30, I need to select 30 + Days, 45 + Days, 60 + Days and 90 + Days.

What I want is if I select 30 + Days it should include the other selections and no the range between 30 and 45.

This is in a List Box with field as expression.

Can you please help me with this?

27 Replies
Miguel_Angel_Baeyens

Definitely! Also, the cleanest way of doing it in the script, unless some of the JOINs requires so much memory to run (if tables have millions of rows, this could happen).

These post among many have examples and code working:

transform table (range of dates)

Range based on a table

Anonymous
Not applicable
Author

... I wouldn't join the intervalmatch() - table because the intervals are overlapping...

Anonymous
Not applicable
Author

I am not going to use your information. I will modify the ranges and set '30 to 45'. '45 to 60', '60 to 90' and '90 +' so if the user want all data he must click on the values.

Thanks all for your comments.

Kushal_Chawda

Please mark the answers as correct or helpful and close the thread

Anonymous
Not applicable
Author

don't know how to close the thread.

Miguel_Angel_Baeyens

You just did

Kushal_Chawda

Yes, you can modify your ranges as per the requirement.

Kushal_Chawda

You marked the correct answer, than means thread closed