Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

if then else and variables

I have loaded in some Variables into Qlikview using an excell spreadsheet and given the variables a field name of Variable i then want to display the value of the variable in a pivot table

I was thinking of using If (class=Variable,Variable,0)

where the name of the variable is the same as the name of the class then display the value of the variable or else display 0 or no match.

Any advice would be graetly appreciated.

5 Replies
tresesco
MVP
MVP

it seems ok. if it is not working, you might want to check with '$' symbol and quotes appropriations. or else, if you can upload a sample application.

Thanks.

Not applicable
Author

if i put the following code

=If (class =Variable,Variable)

Two value are displayed a null value and the name of the variable.

Whereas i want to display the value of the variable. and only show null if they isnt a match

If i use this code =If (class =Variable,Variable,0)

Then both the Variable name and a 0 is displayed.

I will try and get an example Qlikview doc to demonstraight later on today.

Thanks in advance for any help.

jvitantonio
Luminary Alumni
Luminary Alumni

Hi, try this:

=if(class = $(variable), class)

Not applicable
Author

Hi Qlikuser14

This is giving an error on calculated dimension.

Thanks,

              Iain

tresesco
MVP
MVP

Best way could be - if you can upload the sample application.

Thanks.