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

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)
  • VaR

1 Solution

Accepted Solutions
sunny_talwar

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
sunny_talwar

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

soniasweety
Master
Master
Author

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)

 

soniasweety
Master
Master
Author

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

sunny_talwar

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

soniasweety
Master
Master
Author



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

sunny_talwar

Change the expression to this

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

soniasweety
Master
Master
Author

getting error

sunny_talwar

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)

soniasweety
Master
Master
Author

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 )