I am trying to develop a payment schedule rollup for our expenditures. I have a disconnected table with various payment durations and I want to total the checks that were paid in that time period.
[TABLE="width: 375"]
<tbody>[TR]
[TD="width: 95, bgcolor: transparent"]Duration
[/TD]
[TD="width: 108, bgcolor: transparent"]Jan 018
[/TD]
[TD="width: 96, bgcolor: transparent"]Feb 2018
[/TD]
[TD="width: 201, bgcolor: transparent"]etc
[/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]Immediate
[/TD]
[TD="width: 108, bgcolor: transparent"]$100
[/TD]
[TD="width: 96, bgcolor: transparent"]$200
[/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]1-7 days
[/TD]
[TD="width: 108, bgcolor: transparent"]$300
[/TD]
[TD="width: 96, bgcolor: transparent"]$40
[/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]8-14 days
[/TD]
[TD="width: 108, bgcolor: transparent"]$400
[/TD]
[TD="width: 96, bgcolor: transparent"]$300
[/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]etc
[/TD]
[TD="width: 108, bgcolor: transparent"][/TD]
[TD="width: 96, bgcolor: transparent"][/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
The difficulty is that my one-dimensional rollup measure is giving duplicate results as follows…
Each payment we make is composed of multiple vouchers. A voucher can come in any time before we cut our next check to that vendor. Our ERP reports them as:
<tbody>
[TD="width: 82, bgcolor: transparent"] 001
[/TD]
[TD="width: 122, bgcolor: transparent"] 5
[/TD]
[TD="width: 122, bgcolor: transparent"] $10
[/TD]
[TD="width: 122, bgcolor: transparent"] 455
[/TD]
[TD="width: 122, bgcolor: transparent"] $30
[/TD]
[TD="width: 82, bgcolor: transparent"] 002
[/TD]
[TD="width: 122, bgcolor: transparent"] 10
[/TD]
[TD="width: 122, bgcolor: transparent"] $10
[/TD]
[TD="width: 122, bgcolor: transparent"] 455
[/TD]
[TD="width: 122, bgcolor: transparent"] $30
[/TD]
[TD="width: 82, bgcolor: transparent"] 003
[/TD]
[TD="width: 122, bgcolor: transparent"] 12
[/TD]
[TD="width: 122, bgcolor: transparent"] $10
[/TD]
[TD="width: 122, bgcolor: transparent"] 455
[/TD]
[TD="width: 122, bgcolor: transparent"] $30
[/TD]
</tbody>
Prior to the need to display the AP calendar I had a fairly standard summarization measure that I use to ensure I only total check amounts across check numbers:
This was my starting code, but I realized that it was assigning the check amount to EVERY duration where a voucher was listed.
Since there are vouchers in my example that fall into both the 1-7 and 8-14 duration I’m reporting $30 in each duration. I need to ensure that the check is assigned to only one of the durations within the list of vouchers. There is some internal debate as to whether it should be an AVERAGE or MAX of the Actual Days to Pay, but either way I’m struggling to determine how I can group the measure properly. I’ve visited the SQLBI site but, as is true 90% of the time, their explanations are way over my head.
Thanks for any help you can give!
[TABLE="width: 375"]
<tbody>[TR]
[TD="width: 95, bgcolor: transparent"]Duration
[/TD]
[TD="width: 108, bgcolor: transparent"]Jan 018
[/TD]
[TD="width: 96, bgcolor: transparent"]Feb 2018
[/TD]
[TD="width: 201, bgcolor: transparent"]etc
[/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]Immediate
[/TD]
[TD="width: 108, bgcolor: transparent"]$100
[/TD]
[TD="width: 96, bgcolor: transparent"]$200
[/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]1-7 days
[/TD]
[TD="width: 108, bgcolor: transparent"]$300
[/TD]
[TD="width: 96, bgcolor: transparent"]$40
[/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]8-14 days
[/TD]
[TD="width: 108, bgcolor: transparent"]$400
[/TD]
[TD="width: 96, bgcolor: transparent"]$300
[/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="width: 95, bgcolor: transparent"]etc
[/TD]
[TD="width: 108, bgcolor: transparent"][/TD]
[TD="width: 96, bgcolor: transparent"][/TD]
[TD="width: 201, bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
The difficulty is that my one-dimensional rollup measure is giving duplicate results as follows…
Each payment we make is composed of multiple vouchers. A voucher can come in any time before we cut our next check to that vendor. Our ERP reports them as:
Voucher | Actual Days to Pay | Voucher Amount | Check Number | Payment Amount |
<tbody>
[TD="width: 82, bgcolor: transparent"] 001
[/TD]
[TD="width: 122, bgcolor: transparent"] 5
[/TD]
[TD="width: 122, bgcolor: transparent"] $10
[/TD]
[TD="width: 122, bgcolor: transparent"] 455
[/TD]
[TD="width: 122, bgcolor: transparent"] $30
[/TD]
[TD="width: 82, bgcolor: transparent"] 002
[/TD]
[TD="width: 122, bgcolor: transparent"] 10
[/TD]
[TD="width: 122, bgcolor: transparent"] $10
[/TD]
[TD="width: 122, bgcolor: transparent"] 455
[/TD]
[TD="width: 122, bgcolor: transparent"] $30
[/TD]
[TD="width: 82, bgcolor: transparent"] 003
[/TD]
[TD="width: 122, bgcolor: transparent"] 12
[/TD]
[TD="width: 122, bgcolor: transparent"] $10
[/TD]
[TD="width: 122, bgcolor: transparent"] 455
[/TD]
[TD="width: 122, bgcolor: transparent"] $30
[/TD]
</tbody>
Prior to the need to display the AP calendar I had a fairly standard summarization measure that I use to ensure I only total check amounts across check numbers:
Code:
[COLOR=#222222][FONT=Verdana]Check Value:=SUMX ([/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] SUMMARIZE ( Vouchers, Vouchers[Check Number] ),[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] CALCULATE ( MAX ( Vouchers[Payment Amount] ) )[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana])[/FONT][/COLOR]
This was my starting code, but I realized that it was assigning the check amount to EVERY duration where a voucher was listed.
Code:
[COLOR=#222222][FONT=Verdana]Actual Payment By Period:=CALCULATE ([/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] [Check Value],[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] FILTER([/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] Vouchers, [/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] Vouchers[Actual Days to Pay] >= MIN('AP Intervals'[Min])[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] && Vouchers[Actual Days to Pay] < MAX('AP Intervals'[Max])[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana] )[/FONT][/COLOR]
[COLOR=#222222][FONT=Verdana])[/FONT][/COLOR]
Thanks for any help you can give!
Last edited: