Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rittermd
Master
Master

variable in Qlik Sense

I created a variable in the app (not the script) to display a count of a certain type record.

The formula editor says that the expression is ok.

However, I can't get anything to display. 

The variable is called vHomeCount and the expression is

If (DestName=('Home'), Count(DISCHARGE_DESTINATION))

I tried to display in a text object and a KPI and neither displays a result.

I remember in QV you had to put a $ in front of it. 

Any assistance would be greatly appreciated.

3 Replies
Anonymous
Not applicable

Yup, you need to dollar expand it in the Text Object like this :

     $(vHomeCount)

Here is a good Blog Post about Dollar Expansion

     The Magic of Dollar Expansions

rittermd
Master
Master
Author

I tried that and I get nothing but a - displayed in the text object

rittermd
Master
Master
Author

I modified the variable expression and took out the If and replaced with set analysis and now it returns the correct value.