Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am working on Gauge chart in Qliksense. I have used reference lines in Gauge chart. I am using following expression:
"Sum({<Year = {'$(vPrevYear)'}, MonthNumber = {'<=$(=vCurMonth)'}, [Transaction Type] = {'Sales'}>}Amount)"
where "$(vPrevYear)" = '2017'. But issue i am facing is this is working when i am selecting any year in the filter. But i have make the expression such that it should always work even if Year value not selected in the Year Filter. can anyone help em in this?
vPrevYear =Year(Date(Today(), 'MM/DD/YYYY'))-1
vCurMonth = Num(Month(Today()))
how have you defined this variable?
in Script or Variable Overview?
Try,
Sum({<Year = {"$(=vPrevYear)"}, MonthNumber = {'<=$(=vCurMonth)'}, [Transaction Type] = {'Sales'}>}Amount)
Hello Shraddha,
I have used following
vPrevYear =Year(Date(Today(), 'MM/DD/YYYY'))-1
vCurMonth = Num(Month(Today()))
and above formula giving us correct values, so i don't think there is some issue with formula. I would request you if you can make some dummy gauge chart and add reference lines and check if they works without selecting filter value of year
That's quite strange, because since you make your variable using today(), there is no need to select a year for it to work.
When you don't select any year, there is no value on your gauge, that's it ? May you share a picture of the problem you're facing please ?
Regards,
Marina
Hey Shraddha,
In the Gauge chart, i ahve simply placed the value in reference line, but still reference line not visible. Pls.find attached snapshot
Hey Marina,
In the Gauge chart, i ahve simply placed the value in reference line, but still reference line not visible. Pls.find attached snapshot