Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview and am trying to restrict the results of an expression using a Variable $(vSales Gross) to only show values from the previous day.
I have tried =({<[Date]={'$(=Date(today()-1))'}>} $(vSales Gross))
Any help would be greatly appreciated
So, your "yesterday" expression is:
sum({<[Date]={'$(=Date(today()-1))'}>} [AGG Sales])
+sum({<[Date]={'$(=Date(today()-1))'}>}[IB Sales])
+sum({<[Date]={'$(=Date(today()-1))'}>}[OB Sales])
+sum({<[Date]={'$(=Date(today()-1))'}>}[WEB Sales])
Try =sum({<[Date]={'$(=Date(today()-1))'}>} $(vSales Gross))
We have no idea what's inside that $(vSales Gross)
It could be another sum() there. In this case the set must be inside this variable.
True, we also have no idea if the Date field contains date values or text values or any values at all.
Hi Tim,
Try below expression.
sum({<Date={'$(=Date(today()-1))'}>} $(vSales Gross))
Thanks,
krish
try
Only({<[Date]={'$(=Date(today()-1))'}>} $(vSales Gross))
Hi,
Thanks. The Date field is date values and the Variable does contain Sum().
Tim
That means that the set should be inside the variable. But you apparently use it somewhere else so can't change it. In this case don't use it for the "yesterday" calculation. Use expression per Gysbert but instead of the variable use field to sum.
If it is more complex than that, tell us what is the variable definition.
Thanks,
The Variable definition is sum([AGG Sales])+sum([IB Sales])+sum([OB Sales])+sum([WEB Sales])
Tim
So, your "yesterday" expression is:
sum({<[Date]={'$(=Date(today()-1))'}>} [AGG Sales])
+sum({<[Date]={'$(=Date(today()-1))'}>}[IB Sales])
+sum({<[Date]={'$(=Date(today()-1))'}>}[OB Sales])
+sum({<[Date]={'$(=Date(today()-1))'}>}[WEB Sales])