Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
engishfaque
Specialist III
Specialist III

Sum of Quantitiy - Expression

Dear All,

I'm facing an issue in sum of quantity expressions.

Problem: When I'm using these expressions, these expressions are returning Zero "0" instead of sum of quantity.

Please note, D is stand for Day(s)

Here are expressions:

1D = Sum({<cdate = {">=$(=Date(Max([date/time])))"}>} [quantity])

7D = Sum({<cdate = {">=$(=Date(Max([date/time])-6))"}>} [quantity])

15 = Sum({<cdate = {">=$(=Date(Max([date/time])-15))"}>} [quantity])

30D = Sum({<cdate = {">=$(=Date(Max([date/time])-30))"}>} [quantity])



Kindly find attached Qlik Sense app, please make correction and share me back as I can incorporate changes in my original app.

Kind regards,

Ishfaque Ahmed

1 Solution

Accepted Solutions
engishfaque
Specialist III
Specialist III
Author

Dear All,

Problem has been resolved, here are the expressions.

1D = Sum({$<[cdate] = {">=$(=Date(Max([date/time]),'DD-MM-YY'))"}>} [quantity])

7D = Sum({$<[cdate] = {">=$(=Date(Max([date/time])-6,'DD-MM-YY'))"}>} [quantity])

15D = Sum({$<[cdate] = {">=$(=Date(Max([date/time])-15,'DD-MM-YY'))"}>} [quantity])

30D = Sum({$<[cdate] = {">=$(=Date(Max([date/time])-30,'DD-MM-YY'))"}>} [quantity])

Another thread is here,

Sum of quantity where cdate &gt;= d7

Kind regards,

Ishfaque Ahmed

View solution in original post

2 Replies
engishfaque
Specialist III
Specialist III
Author

Dear Experts,

I'm waiting for your valuable solution.

Kind regards,

Ishfaque Ahmed

engishfaque
Specialist III
Specialist III
Author

Dear All,

Problem has been resolved, here are the expressions.

1D = Sum({$<[cdate] = {">=$(=Date(Max([date/time]),'DD-MM-YY'))"}>} [quantity])

7D = Sum({$<[cdate] = {">=$(=Date(Max([date/time])-6,'DD-MM-YY'))"}>} [quantity])

15D = Sum({$<[cdate] = {">=$(=Date(Max([date/time])-15,'DD-MM-YY'))"}>} [quantity])

30D = Sum({$<[cdate] = {">=$(=Date(Max([date/time])-30,'DD-MM-YY'))"}>} [quantity])

Another thread is here,

Sum of quantity where cdate &gt;= d7

Kind regards,

Ishfaque Ahmed