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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Help required on Aging and duration in power bi dax

Hi Team,

 

I need to calculate duration and aging based on the dates selected from the slicer Dateslicer (we used option as Between)

We are having fields like startdate and enddate columns in the source table.

 

Requirement

 

Slicer : 

Slicer.png

 

Duration in Days Calculation

For example: We are having

Startdate                 Enddate

01-Jan-2024         10-Jan-2024

 

We need to calculate duration for above record is  diffference between these two dates :01-jan-2024 & 08-jan-2024 because we selected enddate as 8-jan-2024 from the slicer 

 

Always StartDate>=Selected date from slicer

Enddate should be : <= selected date from the slicer

 

Power bI File LinkAgingDuration.pbix

 

Thanks,

Deva.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-kongfan-msft ,

 

Requirement was resolved by myself. Thanks for your message.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

Can't open the pbix file you shared, please re-share it in another way and I'll get back to you as soon as possible.

 

Best Regards,
Adamk Kong

Anonymous
Not applicable

Hi @v-kongfan-msft ,

 

Requirement was resolved by myself. Thanks for your message.

lbendlin
Super User
Super User

You can let the data model help you, with USERELATIONSHIP

 

lbendlin_0-1705276229687.png

 

What's your formula for aging?

Anonymous
Not applicable

Hi @lbendlin ,

 

I've created relation in data model and created measure for duration. 

 We are using matrix visual to show the data . Duration is showing correctly in the detail level( last drill down level) while we drill up to above level duration showing wrong values(means its not summing up the data)

 

For example:

 

Deatil Level

These duration values(Highloghted in yellow) are calculating correctly

 

Detail.png

 

Drill Up Level

 

When we drill up the data showing wrong value )highlighted yellow)

we need to show : sum of 4.94+1.11

 

Drillup.png

 

I tried in my way but unable to solve the issue . Can you please help on the same?

Measure name created in the attached file is: Duration_Day

 

Power file Link:  AgingDuration.pbix

 

Thanks,

Deva.

Your slicer should be fed by a proper calendar table, not by 

DISTINCT(Sheet1[StartDate])

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.