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: 
New2QlikView
Contributor
Contributor

Text Object - If Statement where Variable equals dimension

I'm trying to create a text object with an if statement.  I've created a variable called vDisplayLevel which relates to record numbers within a data set.  I want certain fields to appear when the variable equals the corresponding record but I can't seem to get it to work.

Currently I'm using

=if(( vDisplayLevel = [Room]) , [Resident] , '')

and I've also tried

=if(( vDisplayLevel = [RoomNo]) , [Resident] , '')  which converts the field [Room] to a text string.  Neither of these seem to work and I can't seem to figure out what I'm doing wrong.

Any help would be greatly appreciated.

 

 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Are there multiple values for Resident that you expect to see? May be try one of these

=Concat(DISTINCT If(vDisplayLevel = [Room], [Resident], ''))

or

=Concat(DISTINCT If(vDisplayLevel = [RoomNo], [Resident], ''))

View solution in original post

2 Replies
sunny_talwar

Are there multiple values for Resident that you expect to see? May be try one of these

=Concat(DISTINCT If(vDisplayLevel = [Room], [Resident], ''))

or

=Concat(DISTINCT If(vDisplayLevel = [RoomNo], [Resident], ''))
New2QlikView
Contributor
Contributor
Author

Perfect, option 1 worked.