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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
ashis
Creator III
Creator III

Evaluate variable value from excel

Hi,

In my qliksense dashboard I have declared vCity variable like the syntax below and it perfectly works fine

vCity = IF($(vCountry)=0,'CityFlag={1}','CityFlag={2}')

Now I want to read this variable from excel sheet so in excel I wrote it like 

vCity  '= IF($(vCountry)=0,'CityFlag={1}','CityFlag={2}')' , like the image below

ashis_0-1652195039561.png

But it is not working, what syntax show I need to pass so that it can evaluate it value.

 

 

Labels (4)
1 Solution

Accepted Solutions
vchuprina
Specialist
Specialist

Hi, 

Cover your $(vCountry) variable into single quotes  and remove '=' and single quotes at the start and at the end of your expression 

Before:

'= IF($(vCountry)=0,'CityFlag={1}','CityFlag={2}')' 

After:

IF('$(vCountry)'=0,'CityFlag={1}','CityFlag={2}')

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").

View solution in original post

3 Replies
Andrea_Spinetti
Former Employee
Former Employee

Hi @ashis, I'm not sure I've fully understood your request. Why would you like to write the variable's formula in Excel? Is there a specific reason why you are trying to do so? Or do you want the variable to be exported as a usable formula in Excel? Feel free to add more details so I can better assist. Thanks!

If the issue is solved please mark the answer with Accept as Solution.
ashis
Creator III
Creator III
Author

HI Andrea,

Thank you for your reply.  I want to import all the variables from excel to QlikSense dashboard instead of making variables in the APP.

So my struggle is when I define a variable using "=", in the Application it works fine . Now I want same formula to read from excel . I am unable to pass the variable value with "=" . 

So when I see after importing variables from excel it is making the variable vCity as 

IF($(vCountry)=0,'CityFlag={1}','CityFlag={2}') where as I want to make it as 

= IF($(vCountry)=0,'CityFlag={1}','CityFlag={2}')

 

Thanks

 

vchuprina
Specialist
Specialist

Hi, 

Cover your $(vCountry) variable into single quotes  and remove '=' and single quotes at the start and at the end of your expression 

Before:

'= IF($(vCountry)=0,'CityFlag={1}','CityFlag={2}')' 

After:

IF('$(vCountry)'=0,'CityFlag={1}','CityFlag={2}')

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").