Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply

Calculating Actual Revenue and Bonus Deductions with FIFO Method

I have a member deposit table where customers make deposits, and we offer varying bonus percentages. For instance, if a customer deposits 1,000, we provide an additional 200, resulting in a total deposit of 1,200. When customers make purchases, they draw from this 1,200 balance. However, we must record the actual revenue and deduct the extra bonus amounts. Customers deposit at different times, each with a unique bonus percentage. To accurately record actual revenue, we employ the FIFO (First-In-First-Out) method.

For example, if a customer makes an initial deposit of 100,000 with a 20,000 bonus on the first date, followed by another deposit of 100,000 with a 30,000 bonus on the second date, and the customer consumes 130,000, the actual revenue and extra bonus amounts are distributed between the first and second dates. In this scenario, the actual revenue is calculated as follows: (120,000 * (100% / (100% + 20%))) + (10,000 * (100% / (100% + 30%))). The remaining deposit is 120,000 (including the bonus) and  (100,0000-(10,000*(100%/(100%+30%) (excluding the bonus). We want to represent this information with two columns. The calculation example is presented in the table below:

 

Member Deposit

DateTransaction NumberMember CardDepositMember Bonus PercentageMember Bonus AmountCT RateCT AmountCT Due Date
1/1/2023 10000110000020%200003%3000 
2/1/2023 10000110000030%300003%3000 
1/2/2023 1000025000010%50003%1500 

 

Member Sales

Sales InvoiceSales DateMember CardDepartmentMonthCT Due DateDescriptionTotal SalesBank AccountTax Rate
 2/1/2023100001 23/10/2023 50000 5%
 3/1/2023100001 34/10/2023 70000 5%
 4/1/2023100001 45/10/2023 20000 5%
 4/1/2023100002 45/10/2023 10000 5%

 

The final result i want to get;

Sales InvoiceSales DateMember CardDepartmentMonthCT Due DateDescriptionTotal SalesBank AccountTax RateActual SalesRemaining Balance(Include Member)Remaining Balance(Exclude Member)Member Discount
 2/1/2023100000 23/10/2023            50,000 0.05              41,66750,000                           58,333                           8,333
 3/1/2023100000 34/10/2023            70,000 0.05              57,58580,000                         100,748                         12,415
 4/1/2023100001 44/10/2023            20,000 0.05              15,38560,000                           85,363                           4,615
 4/1/2023100002 45/10/2023            10,000 0.05                9,09140,000                           40,909                              909

 

Could you please help me in solving this problem?

1 REPLY 1
lbendlin
Super User
Super User

if a customer makes an initial deposit of 100,000 with a 20,000 bonus on the first date, followed by another deposit of 100,000 with a 30,000 bonus on the second date

wait, what?  Where did the 30% come from?  What happens when they make a third deposit?

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.