Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please Help....Set Analysis for "Yesterday"

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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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])

View solution in original post

10 Replies
Gysbert_Wassenaar

Try  =sum({<[Date]={'$(=Date(today()-1))'}>} $(vSales Gross))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

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.

Gysbert_Wassenaar

True, we also have no idea if the Date field contains date values or text values or any values at all.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Tim,


Try below expression.


sum({<Date={'$(=Date(today()-1))'}>} $(vSales Gross))

Thanks,

krish

Not applicable
Author

try

Only({<[Date]={'$(=Date(today()-1))'}>} $(vSales Gross))

Not applicable
Author

Hi,

Thanks. The Date field is date values and the Variable does contain Sum().

Tim

Anonymous
Not applicable
Author

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.

Not applicable
Author

Thanks,

The Variable definition is sum([AGG Sales])+sum([IB Sales])+sum([OB Sales])+sum([WEB Sales])

Tim

Anonymous
Not applicable
Author

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])