Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Cumulative Sum with condition

Hi Experts,

I need some help with doing a cumulative sum on a pivot table. This sum would be to calculate when a customer's payment is due. This is done by week. I would like to display the following 4 weeks, from today, and have overdue payments fall into the current week.

Currently this is what the actual result looks like.

Table1:

1.jpg

This is the outcome I am aiming for.

Table2:

2.jpg

I assume that this might be something I need to calculate within the script, perhaps adjust the due date when I load the data?

 

Any help would be appreciated.

Thanks,

Wynand

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Cumulative Sum with condition

Hi,

Maybe try to adjust your WeekDue dimension to an expression:

If(WeekDue<=Week(Today()), Week(Today()), WeekDue)

* Beware that from the performance perspective, calculated dimensions are not recommended.

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: Cumulative Sum with condition

Hi,

Maybe try to adjust your WeekDue dimension to an expression:

If(WeekDue<=Week(Today()), Week(Today()), WeekDue)

* Beware that from the performance perspective, calculated dimensions are not recommended.

View solution in original post

Highlighted
Partner
Partner

Re: Cumulative Sum with condition

Thank you. That works.

To be honest, I did not expect the measure to calculate accordingly.

Thanks Again,

Wynand