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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Pass value for calculation to another table

Hello,

 

I have a table with sales data from 2020 - today. We are trying to figure out if we can use historical pay-up data in order to predict how much of current sales will end up paid. We'd also like to apply historical pay-up rates against forecasted sales. We have an SQL view that includes similar data to the following:

DateOrder#Gross RevDate PdPd AmountRefund AmountWrite Amount
1/3/202020-1 $    50.002/5/2020 $       50.00 $                50.00 
1/5/202020-2 $    30.00    $             30.00
1/8/202020-3 $    56.002/6/2020 $       56.00 $                25.00 
1/11/202020-4 $    24.003/5/2020 $       24.00  
1/14/202020-5 $    68.002/15/2020 $       68.00 $                68.00 
1/16/202020-6 $    23.00    $             23.00
1/19/202020-7 $      7.00    $               7.00
1/21/202020-8 $    59.003/31/2020 $       59.00  
1/23/202020-9 $    22.001/23/2020 $       22.00  
1/27/202020-10 $    64.002/27/2020 $       64.00 $                35.00 
1/29/202020-11 $    85.00    $             85.00
1/30/202020-12 $    35.001/30/2020 $       35.00  
2/3/202020-13 $    56.002/15/2020 $       56.00  
2/6/202020-14 $    47.003/15/2020 $       47.00  
2/10/202020-15 $    95.004/15/2020 $       95.00 $                25.00 
2/14/202020-16 $    45.00    $             45.00
2/16/202020-17 $    55.002/16/2020 $       55.00  
2/18/202020-18 $    35.002/28/2020 $       35.00 $                35.00 



The pay-up rate is calculated by dividing total pd by total gross revenue. Any orders still unpaid after 12 months are written off, so I'd like to be able to calculate a pay-up rate on 2020's data (for example) and apply it against sales from the last 12 months to predict how much will be paid. I'd like the date range we use for the pay-up to be dynamic. So, for example, we'd be able to use 2020's pay-up rate and then change the slicer to 2021 to see how the predicted pay-ups change. I have no idea if this is possible and if so, how to approach it. I'm guessing the pay-up rate would have to be saved as a variable? Any guidance is greatly appreciated.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Your sample data is insufficient for the scenario you describe. See attached for a general approach by month (rather than year).  You will need to adjust that for the write-off rules.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

Your sample data is insufficient for the scenario you describe. See attached for a general approach by month (rather than year).  You will need to adjust that for the write-off rules.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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