Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

if else statement on text object

Hi Everyone,

Can anyone please help me on this.

In a Text object when Category = Entertainment and ID=2 then the display name=TRUE need to be visible.

In the below sample data

sample.png

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Well, a bit simplified and corrected one working:

=MaxString({<MetricGroup={'culture and behaviour'}, [RAG Ind]={'2'}>}[metric c display name])

View solution in original post

6 Replies
Anil_Babu_Samineni

May be this?

If(Match(Category, 'Entertainment') and Match(ID, 2), 'TRUE', ' ')

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
tresesco
MVP
MVP

Do you want to select those values and see the result or if the values are there (not necessarily selected) in scope you wish to see the output?

bhavvibudagam
Creator II
Creator II
Author

Without selection only I need to get displayname. But the value TRUE is not hardcoded.

I have tried this =if(Categoty='Entertainment' and ID='2',Displayname) but

when i filter the data then only I am able to get the result.

Please help me how to get by without selections.

tresesco
MVP
MVP

Try like:

=if(Max(Index(Categoty,'Entertainment')) and Max(Index(ID,'2')),Displayname)

bhavvibudagam
Creator II
Creator II
Author

Hi Tresesco,

Thanks for your reply.

But its not working. Please find the attached app with error.

Actually its a sample data always Entertainment is not be the first record.

tresesco
MVP
MVP

Well, a bit simplified and corrected one working:

=MaxString({<MetricGroup={'culture and behaviour'}, [RAG Ind]={'2'}>}[metric c display name])