Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a question, I have a column with KMs with ranges like 15,5023,28855,293754,100040 etc..
And in my filter i need to have intervals like 5000-10000-15000-20000 etc, 5000 per 5000 km selection..
Is it possible?
Hi
Either, you can create a field in script by using if statement like
if(Kms <= 5000, '<= 5000', if(Kms <= 10000, '5000-10000', '>10000')) as KmsRange
and use KmsRange field in front end.
Else, try with Class function as dimension in front end like
=Class(Kms , 5000, 'KmsRange')
Hi
Either, you can create a field in script by using if statement like
if(Kms <= 5000, '<= 5000', if(Kms <= 10000, '5000-10000', '>10000')) as KmsRange
and use KmsRange field in front end.
Else, try with Class function as dimension in front end like
=Class(Kms , 5000, 'KmsRange')
Omg thank you Mayil!
It worked perfectly!
I have the filter like "0<=KmsRange < 5000" for each line of filter as its name, is there a way I can put like 5000,10000,15000? That is an extra.. if it is possible
in that case, you need to create the field in the script and use in the front end.
Thanks
It's all ok, i have some script errors here, any ideia?
Sorry last question!
Its all good! My mistake, i am a rookie still..
Thank you!!
if([KM from] <= 15000, '<= 15000', if([KM from] <= 15000, '15000-20000', '>20000')) as Km_from
Can I do this further? Like untill 300000 ? I ve tried :
if([KM from] <= 5000, '<= 5000', if([KM from] <= 10000, '5000-10000', '>10000',
if([KM from] <= 15000, '<= 15000', if([KM from] <= 15000, '15000-20000', '>20000')))) as Km_from,
with no success..
any clue?
Hi
Try like below
if([KM from] <= 5000, '<= 5000', if([KM from] <= 10000, '5001-10000',
if([KM from] <= 15000, '10001-15000', if([KM from] <= 20000, '15001-20000', '>20000')))) as Km_from,