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

expression if > fails

Hello

I need some help with the following expression

IF((Count({<prioname={'Blocker'}, stringvalue={'FAT'}>}iid)) > SUM({<Soort={'Blocker'}>} Aantal), 1,

IF((Count({<prioname={'Critical'}, stringvalue={'FAT'}>}iid)) > SUM({<Soort={'Critical'}>} Aantal), 2,

IF((Count({<prioname={'Major'}, stringvalue={'FAT'}>}iid)) > SUM({<Soort={'Major'}>} Aantal), 3,

IF((Count({<prioname={'Minor'}, stringvalue={'FAT'}>}iid)) > SUM({<Soort={'Minor'}>} Aantal), 4,0

))))

values

(Count({<prioname={'Blocker'}, stringvalue={'FAT'}>}iid) = 4

(Count({<prioname={'Critical'}, stringvalue={'FAT'}>}iid) = 0

(Count({<prioname={'Major'}, stringvalue={'FAT'}>}iid) = 8

(Count({<prioname={'Minor'}, stringvalue={'FAT'}>}iid) = 13

SUM({<Soort={'Blocker'}>} Aantal)   = 15

SUM({<Soort={'Critical'}>} Aantal)    = 15

SUM({<Soort={'Major'}>} Aantal)      = 15

SUM({<Soort={'Minor'}>} Aantal)      = 15

Question:

If i run this the result is 3. but Why? i expect it to be 0

1 Solution

Accepted Solutions
Not applicable
Author

I checked the values ... If i run them i get the values as stated in my original post.

But I have the answer. I had added a demention on Aantal. This was the problem.

removed it an it works as a shine

View solution in original post

2 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Your If expression seems to be perfect.  Just cross check the values.

You can generate If expression by using the following http://www.qlikblog.at/464/tool-creating-nested-ifstatements/

Regards,

Jagan.

Not applicable
Author

I checked the values ... If i run them i get the values as stated in my original post.

But I have the answer. I had added a demention on Aantal. This was the problem.

removed it an it works as a shine