New to QlikView

Discussion board where members can get started with QlikView.

Announcements
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 :

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,

Best regards,

Axel

Tags (1)
1 Solution

Accepted Solutions
MVP

Re: Condition

Nearly got it:

try this:

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,

16 Replies
MVP

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,

MVP

Re: Condition

Nearly got it:

try this:

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,

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...

Highlighted
MVP

Re: Condition

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,

Contributor II

Re: Condition

I just tried your solution is perfect

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

Contributor II

Re: Condition

Hi Dunny,

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

MVP

Re: Condition

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

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 ...?

MVP

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)