Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, Live Q&A, September 22: Moving from QlikView to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

[ASK] how to sum last 50 days grouped by dayname

Dear QlikView master,

my client have a requirement to sum value for the last 50days and grouped by dayname.

For example mw last 56days data will be like below :

Untitled.png

with expressions :

sum({<Year=, Quarter=, Month=, Week=, CalDate=

{'>=$(=date(daystart(vEndDate, -$(vDayParam)*7)))'}*{'<=$(=date(daystart(vEndDate)))'}>}

Quantity)

And User expectation will be like :

Untitled.png

Is that achieveable with qlikview?

if yes, how to achieve that expectation?

Thank You,

Best Regards

1 Solution

Accepted Solutions
Highlighted
Specialist II
Specialist II

Not sure why you would need the aggr.

I think just this would work.

sum({<Date={">=$(=Date(Today()-56,'MM/DD/YYYY'))"}>}Value)

View solution in original post

4 Replies
Highlighted
Partner
Partner

Hi Rendi,

Use the following expression,

sum({<Date={">=$(=Date(Today()-50,'MM/DD/YYYY'))"}>}aggr(sum({<Date={">=$(=Date(Today()-50,'MM/DD/YYYY'))"}>}Value),NameDay))

And make a chart with only the NameDay and expression. I've hardcoded the 50 value, so it gets the last 50 days as of today, but you can change the logic behind it

Attached a sample data and qvw file.

Felipe.

Highlighted
Specialist II
Specialist II

Not sure why you would need the aggr.

I think just this would work.

sum({<Date={">=$(=Date(Today()-56,'MM/DD/YYYY'))"}>}Value)

View solution in original post

Highlighted
Partner
Partner

Yeah, you're right Wallo, it's not really needed.

He can simply put it the way you stated.

Highlighted
Partner
Partner

yes thank's..