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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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