Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist III
Specialist III

var not working

Hi all,

@sunny_talwar 

i am using this in script. but one variable is not working  its showing when i add in text object  expression garbage

 

 

Labels (1)
1 Solution

Accepted Solutions
Highlighted

Add single quotes or double quotes

=sum({$<Year,Half_Year,Quarter={'$(=vPrevYrQtr)'},Type={'SR'}>}SA)
+sum({$<Year,Half_Year,Quarter={'$(=vPrevYrQtr)'},Type={'SR'}>}SA)

 

=sum({$<Year,Half_Year,Quarter={"$(=vPrevYrQtr)"},Type={'SR'}>}SA)
+sum({$<Year,Half_Year,Quarter={"$(=vPrevYrQtr)"},Type={'SR'}>}SA)

View solution in original post

12 Replies
Highlighted

Would you be able to show an image of these three variable in variable overview

Highlighted
Specialist III
Specialist III

Hi sunny,

 

second variable we are not using anywhere so no issue with that.

remaining two screen shots.   in dashboard quarter is selected  2019Q2 on open.(Max quarter)

 

Highlighted
Specialist III
Specialist III

i n text object  added variable the below error is coming.

Highlighted

Just try to use =vPrevYrQtr in the text box object instead of =$(vPrevYrQtr)

Highlighted
Specialist III
Specialist III



the result is 111180.45 but when use that variable in expression its giving me 0

Highlighted

Change the expression to this

=sum({$<Year,Half_Year,Quarter={$(=vPrevYrQtr)},Type={'SR'}>}SA)
+sum({$<Year,Half_Year,Quarter={$(=vPrevYrQtr)},Type={'SR'}>}SA)

Highlighted
Specialist III
Specialist III

getting error

Highlighted

Add single quotes or double quotes

=sum({$<Year,Half_Year,Quarter={'$(=vPrevYrQtr)'},Type={'SR'}>}SA)
+sum({$<Year,Half_Year,Quarter={'$(=vPrevYrQtr)'},Type={'SR'}>}SA)

 

=sum({$<Year,Half_Year,Quarter={"$(=vPrevYrQtr)"},Type={'SR'}>}SA)
+sum({$<Year,Half_Year,Quarter={"$(=vPrevYrQtr)"},Type={'SR'}>}SA)

View solution in original post

Highlighted
Specialist III
Specialist III

thank you sunny first one is working.. but.. when i select 2018Q4 or some other year quarter ... the variable value in the listbox is not changing means it should show 2017Q4 but still its showing 2018Q2 ( this is the default year selected is 2019Q2 so prev yr qtr is 2018Q2 )