Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Hatus
Partner - Creator II
Partner - Creator II

How to range date field in Set Analysis

Hi everyone

Can anyone help me to figure out how to solve this expression? In a Pivot Table or Straight Tabel

Sum({<Calendar_BookingDate.Datum = {">=$(=PDGroups.PurchaseDate)<=$(=vKeyDate)"}>} PAYMENTS)

Objective: For each Portfolio (dimension = PDGroups.Portfolio), give me the sum of payments between its Purchase Date (only one different date per Portfolio) and one fix key date equal to all data line.

Problem: I get aways the minimum date of all Portfolios. But when I select only one Portfolio, it returns the right sum.

Interesting is that when I add an expression to the chart with the PDGroups.PurchaseDate alone, it returns the right date per Portfolio regardless the selection.

The Aggr() Function inside this range set didn't work as well.

May any details be missing, pls just let me know.

Thanx in advance.

HP

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You found out the hard way that comparing fields on a record-by-record basis in a set modifier doesn't work. You'll have to use an if statement instead. Something like this maybe:

Sum( if( Calendar_BookingDate.Datum >=PDGroups.PurchaseDate and Calendar_BookingDate.Datum <= $(=vKeyDate), PAYMENTS))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

You found out the hard way that comparing fields on a record-by-record basis in a set modifier doesn't work. You'll have to use an if statement instead. Something like this maybe:

Sum( if( Calendar_BookingDate.Datum >=PDGroups.PurchaseDate and Calendar_BookingDate.Datum <= $(=vKeyDate), PAYMENTS))


talk is cheap, supply exceeds demand
Hatus
Partner - Creator II
Partner - Creator II
Author

Hi Gysbert

Wonderfull, it works now. I definatelly learned that issue.

Thank you