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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
murti
Contributor II
Contributor II

Sum Operation for future dates using set expression

sum({$<status_id = {'cancelled'}, payment_due_date = {">$(=Date(Today()+1, 'MM-DD-YYYY'))"}>} amount)

This is the expression I used to calculate cancelled prices related to future dates, when i deleted the payment_due_date and its formula from the set expression sum is calculated however, when i specified the case as future or the past (sum({$<status_id = {'cancelled'}, payment_due_date = {"<$(=Date(Today()+1, 'MM-DD-YYYY'))"}>} amount) this is the past form of the expression i wrote), I get 0 as the output. How can i resolve this situation ?

Labels (6)
1 Solution

Accepted Solutions
marksouzacosta

Hi @murti,

Issues like that are mostly related to data conversion issues.
Probably your payment_due_date field is not compatible with Date(Today()+1, 'MM-DD-YYYY')).
To try to solve this, open your Data Model, search for the field payment_due_date and click on it. Check the Tags of this field, even the values alignment will indicate which type it holds - see the example below:

marksouzacosta_0-1716900688908.png

According to these results, we'll have a better idea how to adjust your set expression.

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

View solution in original post

1 Reply
marksouzacosta

Hi @murti,

Issues like that are mostly related to data conversion issues.
Probably your payment_due_date field is not compatible with Date(Today()+1, 'MM-DD-YYYY')).
To try to solve this, open your Data Model, search for the field payment_due_date and click on it. Check the Tags of this field, even the values alignment will indicate which type it holds - see the example below:

marksouzacosta_0-1716900688908.png

According to these results, we'll have a better idea how to adjust your set expression.

 

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com