Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Greetings,
I'm having trouble trying to calculate the following:
I need to calculate the remaining amount for a contract with Start Date, End Date, Current Date, Total Amount and Term, but based on periods of time,
For example:
| Balance Remaining | Total Amount | Total plus interest | Total Collected | % Collected of Total Amount | % Collected of plus interest | AVG MONTH TERM | Current $ | Current % | 1-10 DAYS NOT PAID $ | 1-10 DAYS NOT PAID % | 11-20 DAYS NOT PAID $ | 11-20 DAYS NOT PAID % | 21-30 DAYS NOT PAID $ | 21-30 DAYS NOT PAID % | 31+ DAYS NOT PAID $ | 31+ DAYS NOT PAID % | 31+ DAYS NOT PAID % BASED ON TOTAL PLS INTEREST |
Where 1- 10 days not paid is the amount that a contract is supossed to pay between today and +10, and so on.
Solved! Go to Solution.
@Tangatamanu , what is logic of 1 -0 days.
is it based on start date and today like
bucket = datediff([StartDate], Min(Today(), [End Date]), day)
then you can create a bucket
Switch(True() ,
[Bucket] <= 10 , " 1 - 10" ,
[Bucket] <= 20 , " 10 - 20" ,
// add others as per need
"GT 20"
)
Measure would be like
divide(countrows(Table), calculate(countrows(Table), removefilter(Table[bucket]) ))
@Tangatamanu , what is logic of 1 -0 days.
is it based on start date and today like
bucket = datediff([StartDate], Min(Today(), [End Date]), day)
then you can create a bucket
Switch(True() ,
[Bucket] <= 10 , " 1 - 10" ,
[Bucket] <= 20 , " 10 - 20" ,
// add others as per need
"GT 20"
)
Measure would be like
divide(countrows(Table), calculate(countrows(Table), removefilter(Table[bucket]) ))
Thank you @amitchandak, even though i realize that i didnt explain myself clearly when i was trying to write my problem, what you posted answers my question completly!
Cheers
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 35 | |
| 31 | |
| 20 | |
| 13 | |
| 10 |