Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
srujanaponnuru
Creator
Creator

nested if with only function

Hi All,

 

i have  a formula like below:

if(Len(trim(only({<source = {'ABC'},metrics = {'XYZ'}>}Segment))))>0

I have requirement like i need only(segment) >0 i a similar way only(product)>0 also i need to include in the same above expression

could u please help me on the same.

Labels (1)
3 Replies
srujanaponnuru
Creator
Creator
Author

sorry my formula is as below:

 

if(Len(trim(only({<source = {'ABC'},metrics = {'XYZ'}>}Segment)))>0,1,2)

Chanty4u
MVP
MVP

try this

if(Len(trim(only({<source = {'ABC'},metrics = {'XYZ'}>}Segment)))>0,

if(Len(trim(only({<source = {'ABC'},metrics = {'XYZ'}>}product)))>0

1,2)

 

or

 

if(Len(trim(only({<source = {'ABC'},metrics = {'XYZ'}>}Segment)))>0 and 

if(Len(trim(only({<source = {'ABC'},metrics = {'XYZ'}>}product)))>0

1,2)

srujanaponnuru
Creator
Creator
Author

no its not working