2 Replies Latest reply: Feb 21, 2015 4:45 AM by ISHFAQUE AHMED

# 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

• ###### Re: Sum of Quantitiy - Expression

Dear Experts,

I'm waiting for your valuable solution.

Kind regards,

Ishfaque Ahmed

• ###### Re: Sum of Quantitiy - Expression

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 >= d7

Kind regards,

Ishfaque Ahmed