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

If condition

Hi,

 

I'm trying to use the below condition as a dimension.

 

It's not working.

 

=if([Primary Business Use]=5 ,
if( RangeAvg([Location Activities],[Primary Business Use],[Maximum Potential Loss],[Employee Occupancy],[ISOS Rating])<3,'Fail','Okay'))

 

Thanks..

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be this

If(Upper("Main Usage") = 'LAND', Upper("Main Usage"),
If(Match(Trim(Upper("Main Usage")), 'SALES', 'OFFICE', 'SERVICE', 'OTHER'), 'Sales, Office, Service','R&D, Logistics, Manufacturing')) as "Primary Business Use Description"

View solution in original post

4 Replies
krish2459
Creator
Creator
Author

Hi, 

Please let me know how to correct it.

 

Thanks..

sunny_talwar

The syntax look right... Does this give you an error message when you use this as a dimension?

krish2459
Creator
Creator
Author

Yes It is correct Sunny.

Acutauuly there was syntax error in my expression.

 

I'm have other issue and I'm using the same thread.

It is also belongs to if condtion.

Below is the condition.

 

If(MATCH(trim(Upper("Main Usage")), 'SALES', 'OFFICE', 'SERVICE','OTHER')
,'Sales, Office, Service','R&D, Logistics, Manufacturing') as "Primary Business Use Description"

 

Here  one more new enttry as added in the "Main Usage" category as "LAND".

 

The above condition should satisfy also we need to disply "LAND" as well.

 

Final Out PU sees to be:

"Main Usage":

"LAND"

"Sales, Office, Service"

"R&D, Logistics, Manufacturing"

 

 

 

Thanks..

 

 

sunny_talwar

May be this

If(Upper("Main Usage") = 'LAND', Upper("Main Usage"),
If(Match(Trim(Upper("Main Usage")), 'SALES', 'OFFICE', 'SERVICE', 'OTHER'), 'Sales, Office, Service','R&D, Logistics, Manufacturing')) as "Primary Business Use Description"