# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Valued Contributor 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

Tags (1)
1 Solution

Accepted Solutions
Valued Contributor III

## 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])

Sum of quantity where cdate &gt;= d7

Kind regards,

Ishfaque Ahmed

2 Replies
Valued Contributor III

## Re: Sum of Quantitiy - Expression

Dear Experts,

I'm waiting for your valuable solution.

Kind regards,

Ishfaque Ahmed

Valued Contributor III

## 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])