Hello,
I am trying to compare the calculated prices for different rate tables in our billing system. Below are 2 examples:
Table 1
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Tier[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]Base[/TD]
[TD]Per[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]$100[/TD]
[TD]$2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]2[/TD]
[TD]50[/TD]
[TD]0[/TD]
[TD]$1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]51[/TD]
[TD]9999[/TD]
[TD]0[/TD]
[TD]$.5[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Tier[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]Base[/TD]
[TD]Per[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]$30[/TD]
[TD]$5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD]$25[/TD]
[TD]$4[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11[/TD]
[TD]50[/TD]
[TD]$15[/TD]
[TD]$3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]51[/TD]
[TD]100[/TD]
[TD]$5[/TD]
[TD]$2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]101[/TD]
[TD]9999[/TD]
[TD]0[/TD]
[TD]$1[/TD]
[/TR]
</tbody>[/TABLE]
Definitions:
Calculated prices are cumulative across different tiers. Example: if the quantity is 50, the calculated prices would be $151 (100 + 2(1) + 1(49)) for Table 1, and $205 (30 + 5(5) + 25 + 4(5) + 15 + 3(30)) for Table 2.
When exported from the billing system, the CSV flattens each rate table into a single row:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Table[/TD]
[TD]From(1)[/TD]
[TD]To(1)[/TD]
[TD]Base(1)[/TD]
[TD]Per(1)[/TD]
[TD]From(2)[/TD]
[TD]To(2)[/TD]
[TD]Base(2)[/TD]
[TD]Per(2)[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]100[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]50[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]30[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD]25[/TD]
[TD]4[/TD]
[TD]...[/TD]
[/TR]
</tbody>[/TABLE]
Assumptions:
Ideally, I would like to insert a Calculation column which for a given quantity would calculate the price for all rate tables. Any ideas?
Thanks!
I am trying to compare the calculated prices for different rate tables in our billing system. Below are 2 examples:
Table 1
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Tier[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]Base[/TD]
[TD]Per[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]$100[/TD]
[TD]$2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]2[/TD]
[TD]50[/TD]
[TD]0[/TD]
[TD]$1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]51[/TD]
[TD]9999[/TD]
[TD]0[/TD]
[TD]$.5[/TD]
[/TR]
</tbody>[/TABLE]
Table 2
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]Tier[/TD]
[TD]From[/TD]
[TD]To[/TD]
[TD]Base[/TD]
[TD]Per[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]$30[/TD]
[TD]$5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD]$25[/TD]
[TD]$4[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]11[/TD]
[TD]50[/TD]
[TD]$15[/TD]
[TD]$3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]51[/TD]
[TD]100[/TD]
[TD]$5[/TD]
[TD]$2[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]101[/TD]
[TD]9999[/TD]
[TD]0[/TD]
[TD]$1[/TD]
[/TR]
</tbody>[/TABLE]
Definitions:
- From, beginning quantity greater than or equal to
- To, ending quantity less than or equal to
- Base, flat price added to total
- Per, price per
Calculated prices are cumulative across different tiers. Example: if the quantity is 50, the calculated prices would be $151 (100 + 2(1) + 1(49)) for Table 1, and $205 (30 + 5(5) + 25 + 4(5) + 15 + 3(30)) for Table 2.
When exported from the billing system, the CSV flattens each rate table into a single row:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]F[/TD]
[TD="align: center"]G[/TD]
[TD="align: center"]H[/TD]
[TD="align: center"]I[/TD]
[TD="align: center"]...[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Table[/TD]
[TD]From(1)[/TD]
[TD]To(1)[/TD]
[TD]Base(1)[/TD]
[TD]Per(1)[/TD]
[TD]From(2)[/TD]
[TD]To(2)[/TD]
[TD]Base(2)[/TD]
[TD]Per(2)[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]100[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]50[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]...[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]5[/TD]
[TD]30[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]10[/TD]
[TD]25[/TD]
[TD]4[/TD]
[TD]...[/TD]
[/TR]
</tbody>[/TABLE]
Assumptions:
- Rate tables can have 1-30 tiers
- Approx 8,000 rate tables
- Tiers are identified in the column headings, i.e. From(2) is Tier 2.
Ideally, I would like to insert a Calculation column which for a given quantity would calculate the price for all rate tables. Any ideas?
Thanks!