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

compare range with each other

Hi Folks,

i got a Question: is there any possibility to compare the ranges with eachother, for instance

 

Position, Range

1, 50 -100

2, 150 -200

3, 250 -300

4, 350 - 400

 

my expected Output is: 

Position, Range, Assets

1, 50 -100, fixed assets

2, 150 -200, fixed assets

3, 250 -300, current assets

4, 350 - 400,  current assets.

 

i tried to solve this issue by using of this function:

if(Range > 50 and Range <= 200, 'fixed assets',

if(Range > 250 and Range <= 400, 'fixed assets', 'current assets', 'unknown')) as Assets

but i didn't achieve any results.

Does anybody have any idea?

 

Thanks a lot

Beck

 

 

Labels (1)
6 Replies
Channa
Specialist III
Specialist III

do you have detailed data instead of range

50-100

150-200

 

like 

50

100

200...

 

we cant use <100 if date is '50-100'

 

Channa
beck_bakytbek
Master
Master
Author

Hi Channa,

no, i have only one field like: 50 - 100

Channa
Specialist III
Specialist III

then use  if(Match(range,'50-100','150-200','fixedacc',if(match(range,'200-300',current))

 

try like this

Channa
beck_bakytbek
Master
Master
Author

Hi Channa thanks a lot for your responce,

 

i tried it, but it does not work

Channa
Specialist III
Specialist III

Can you share your expression 

It should work 

 

if(WildMatch(Range,'50-100','150-200'),'fixed'
,if(WildMatch(range,'250-300','350-400'),'current','Other'
)) as Rag2

 

Channa
beck_bakytbek
Master
Master
Author

is there any dynamically way to solve this issue in script, imagine i have more than 100 Rows within one column like:

50 -100

150 -200

250 -300

350 - 400

450 - 500

550 - 600