Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
axel_bgd
Contributor II

Condition

Good afternoon every one !

Please, see below my request :

In one field, I have this :

the result end to : +375

I would like to sort the numbers present : create a condition to show the numbers between

0 to -9

-10 to -149

-150 to -499

-500 to -700

-700 to the ends from the numbers present...

I tried this but unfortunatly is not wrking : could you help me please :

load*,
if(TDM6_R<0 and TDM6_R<-10,'0 à -10',
if(TDM6_R<=-10 and TDM6_R<-150,'-10 à -149',
if(TDM6_R<=-150 and TDM6_R<-500,'-150 à -499',
if(TDM6_R<=-500 and TDM6_R<=-700,'-500 à -700','Résultat inf à -701'
)
)
)
)
as Distance_Parcourue_Inf,

Many thanks for your help.

Best regards,

Axel

Tags (1)
1 Solution

Accepted Solutions

Re: Condition

Nearly got it:

try this:

load*,
if(TDM6_R<0 and TDM6_R>-10,'0 à -10',
if(TDM6_R<=-10 and TDM6_R>-150,'-10 à -149',
if(TDM6_R<=-150 and TDM6_R>-500,'-150 à -499',
if(TDM6_R<=-500 and TDM6_R>=-700,'-500 à -700','Résultat inf à -701'
)
)
)
)
as Distance_Parcourue_Inf,

View solution in original post

16 Replies

Re: Condition

Try this

if(TDM6_R > -10 and TDM6_R < 0, '0 à -10',
if(TDM6_R > -150, '-10 à -149',
if(TDM6_R > -500, '-150 à -499',
if(TDM6_R > -700, '-500 à -700','Résultat inf à -701')))) as Distance_Parcourue_Inf,

Re: Condition

Nearly got it:

try this:

load*,
if(TDM6_R<0 and TDM6_R>-10,'0 à -10',
if(TDM6_R<=-10 and TDM6_R>-150,'-10 à -149',
if(TDM6_R<=-150 and TDM6_R>-500,'-150 à -499',
if(TDM6_R<=-500 and TDM6_R>=-700,'-500 à -700','Résultat inf à -701'
)
)
)
)
as Distance_Parcourue_Inf,

View solution in original post

axel_bgd
Contributor II

Re: Condition

HI Sunny

Many thanks for your help but it takes the number Superior to 0

it takes numbers to -142 to + 375 for the first selection -10 à -149...

Re: Condition

Then add this

if(TDM6_R > -10 and TDM6_R < 0, '0 à -10',

if(TDM6_R > -150 and TDM6_R <= -10, '-10 à -149',

if(TDM6_R > -500 and TDM6_R <= -150, '-150 à -499',

if(TDM6_R > -700 and TDM6_R <= -500, '-500 à -700',

if(TDM6_R <= -700, 'Résultat inf à -701'))))) as Distance_Parcourue_Inf,

Highlighted
axel_bgd
Contributor II

Re: Condition

I just tried your solution is perfect

I was very close I knew it, many thanks for your help Alessandro

axel_bgd
Contributor II

Re: Condition

Hi Dunny,

I tried also and it's working thanks a lot Dunny for your help !

Re: Condition

Dunny? Who is Dunny my friend... my name is Sunny with a S

axel_bgd
Contributor II

Re: Condition

Sorry Sunny I don't take my glasses ^^ an other question last if you the time of curse ...

I need to calculate the deviation regarding the same field : TDM6_R

I took this formul :

Stdev(TDM6_R)

But I think is not this, do you have an idea my friend ...?

Re: Condition

Where are you trying to use this? Script or front end? Also, which object if it is on the front end...

Stdev(TOTAL TDM6_R)