Forum Discussion
Dynamic Ageing Calculation with Date Table and Inactive Relationships
- Anonymous2 years ago
Hi zkeller ,
You might consider using Date Table as a slicer, and using the datediff() function to return the interval between two dates, e.g. year, month, day, etc.
DATEDIFF function (DAX) - DAX | Microsoft Learn
Create measure:
Day_Measure = var _select=SELECTEDVALUE('Date Table'[Date]) return DATEDIFF( MAX('FACT Table'[Case Opened Date]),_select,DAY)Year_Measure = var _select=SELECTEDVALUE('Date Table'[Date]) return DATEDIFF( MAX('FACT Table'[Case Opened Date]),_select,YEAR)If the above doesn't meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi zkeller ,
You might consider using Date Table as a slicer, and using the datediff() function to return the interval between two dates, e.g. year, month, day, etc.
DATEDIFF function (DAX) - DAX | Microsoft Learn
Create measure:
Day_Measure =
var _select=SELECTEDVALUE('Date Table'[Date])
return
DATEDIFF(
MAX('FACT Table'[Case Opened Date]),_select,DAY)Year_Measure =
var _select=SELECTEDVALUE('Date Table'[Date])
return
DATEDIFF(
MAX('FACT Table'[Case Opened Date]),_select,YEAR)
If the above doesn't meet your expectations, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.