Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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', ' ')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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])