Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help please. selected date -1 in set analysis.

Hi,

I am trying to build a set analysis expression which returns the result based on the date previous to the current selection.

My Date field is [Date] , formatted (18/07/2016) and my current expression is:

sum({<[Date]={'$(=Max([Date])-1))'},[Channel]={"Agg"},[Product]={"Motor"}>}[Quoted])

I'm guessing that not only is my syntax incorrect but also the result is a numeric value of the date which need formatting?

Any help would be greatly appreciated.

Many Thanks

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

Sum({<[Date]={"$(=Date(Max([Date])-1, 'DD/MM/YYYY'))"}, [Channel]={"Agg"}, [Product]={"Motor"}>}[Quoted])

Update: Changes I have made are in red above

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

Try this:

Sum({<[Date]={"$(=Date(Max([Date])-1, 'DD/MM/YYYY'))"}, [Channel]={"Agg"}, [Product]={"Motor"}>}[Quoted])

Update: Changes I have made are in red above

nizamsha
Specialist II
Specialist II

in your expression one extra closing  bracket is there i corrected it check this one

sum({<[Date]={"$(=Date( Max([Date])-1)"},[Channel]={"Agg"},[Product]={"Motor"}>}[Quoted])

Not applicable
Author

Perfect.

Thank you.