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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
werna4
New Member

Calculate aging

Dear All,

 

I'm asking for support in calculating aging of items in Power BI. I would like to have 5 categories "0-1 days", "2-7 days", "8-14" days, "15-30 days" and "30 days+". The aging should be calculated against the data in the "Modified" field of my database, and it should exclude the working days. In excel I would create a column for working days with following function: NETWORKDAYS(D2,TODAY())-1 and another column for the aging with following function: IF(I2>30,"30+ days",IF(I2>14,"15-30 days",IF(I2>7,"8-14 days",IF(I2>1,"2-7 days", IF(I2<2,"0-1 days"))))) .

 

Can you please help me, how to translate this to Power BI, as I'm kind of new to this tool and I still have to learn a lot, but I already would like to transfer some of my daily reports related to my work to power BI.

Thanks in advance!

 

Kr,

Attila

1 REPLY 1
Greg_Deckler
Super User
Super User

I have an equivalent for NETWORKDAYS for DAX in the Quick Measure gallery.

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362

 

There is even a version that supports excluding holidays.

 

Your IF statement should work almost verbatim. You would create a measure for NETWORKDAYS using the formulas provided and then use that measure in place of your cell reference for the number of NETWORKDAYS. Let me know if you need additional guidance.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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