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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using a variable for calculated dimension.

I am using a variable having multiple values for a calculated dimension in a straight table, but it is showing only one value in the straight table.
variable definition= if(Left([Resume Title],4)=Left([Requirement Title],4),HotListDisplayName,Null())

I get multiple names for this condition but it is showing only one value.

4 Replies
Not applicable
Author

Hi,

It seems to me the problem is which variable value should match with which line in straight table. Can this be made as an additional field during load? It would make it a lot easier.

Regards

Not applicable
Author

If you really need to use variable in calculated dimension.

Try

variable definition= 'Valuelist(' & chr(39) & concat(distinct if(Left([Resume Title],4)=Left([Requirement Title],4),HotListDisplayName), chr(39) & chr(44) & chr(39)) & chr(39) & ')'

And in the calculated dimension, =$(variable)

That said, your expression will also need to be modified as this calculated dimension is merely a list of value not one of the fields connected to any table.

Clever_Anjos
Employee
Employee

Maybe some combinations does not return values.

Please add a fixed "1" as expression and check if all rows are listed.

Not applicable
Author

I tried an additional load statement as follows.

Load if(left([Resume Title],4)=left([Requirement Title],4),HotListDisplayName,null()) as SuitableConsultants;

Before this I have 3 load statements for 3 different tables(Excel files).

In my if condition the fields are coming from different tables.

The field SuitableConsultants is not showing up in select fields.