Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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

Tags (3)
1 Solution

Accepted Solutions
mov
Esteemed Contributor III

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

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
MVP & Luminary
MVP & Luminary

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

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


talk is cheap, supply exceeds demand
mov
Esteemed Contributor III

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

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.

MVP & Luminary
MVP & Luminary

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

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

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

Hi Tim,


Try below expression.


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

Thanks,

krish

Not applicable

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

try

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

Not applicable

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

Hi,

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

Tim

mov
Esteemed Contributor III

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

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

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

Thanks,

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

Tim

mov
Esteemed Contributor III

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

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