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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bhelou
Responsive Resident
Responsive Resident

Receivable Days aging Dynamic

Hello ,
I Have receivalbles aging to do , i have made measures for the days still not yet received , now i am trying to make aging 30 - 90 - 180 - 360 - 720 etc ...  for it as from the days shown , when i am trying the dax : Max is not accepting saying : The MAX function only accepts a column reference as the argument number 1.

 

Invoices : is a measure of the total invoices
Balance is:  Invoices - Payments

 

FORMULA FOR DAYS ( WORKING )  : 

Receivable Days = IF([Status] = "Paid" , 0 , FORMAT( TODAY() - [Invoice Date], "General Number"))

 

 

Formula  FOR AGING ( NOT WORKING ) : 

Receivable Days 30 =

var getdays = IF(MAX([Receivable Days]) <=30,[Receivable Balance],BLANK())

Return

getdays

 

Thank you for your usual help ,


Attached Sample

Days 0-30.png 



 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@bhelou , If it is column 

calculate([Receivable Balance], filter(Table,Table[Receivable Days]<=30))

 

In case it is a measure

IF(([Receivable Days]) <=30,[Receivable Balance],BLANK())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

@bhelou , Create like


Receivable Days =  IF([Status] = "Paid" , 0 , datediff( [Invoice Date],TODAY(), day))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
VijayP
Super User
Super User

@bhelou 

This File may help you!




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


amitchandak
Super User
Super User

@bhelou , If it is column 

calculate([Receivable Balance], filter(Table,Table[Receivable Days]<=30))

 

In case it is a measure

IF(([Receivable Days]) <=30,[Receivable Balance],BLANK())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I KNOW  i have tried it , it wont work and even if i wirte it as simple to test it out :

Receivable Days 30 =
IF(([Receivable Days]) <=30 , "True","False")  //  it is giving all false , i think it is from the measure of the Receivable days : 
Receivable Days = IF([Status] = "Paid" , 0 , FORMAT( TODAY() - [Invoice Date], "General Number")) // i dont now if it is acurate , please help @amitchandak  many thanks 




 

 

r dASYS.png

@bhelou , Create like


Receivable Days =  IF([Status] = "Paid" , 0 , datediff( [Invoice Date],TODAY(), day))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.