Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
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
Highlighted
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
Highlighted
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
Highlighted
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
Highlighted
Not applicable

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

Hi Tim,


Try below expression.


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

Thanks,

krish

Highlighted
Not applicable

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

try

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

Highlighted
Not applicable

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

Hi,

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

Tim

Highlighted
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.

Highlighted
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

Highlighted
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