Forum Discussion
Dynamic Average Aging based on DATEDIFF between column date and selected date value
- 5 years ago
Hi, hungryhippos1
According to your description, you want to calculate the dynamic average value of datediff between the [startdate] and the selected date in Slicer, you can follow my steps:
- Create these two measures:
Datediff = var _selecteddate=SELECTEDVALUE(Table2[Date]) var _datediff=DATEDIFF(MAX('Table1'[startdate]),_selecteddate,DAY) return _datediffAverage of datediff = AVERAGEX(values('Table1'[startdate]),[Datediff])- Create a Slicer and place ‘Table2’[Date], a table and place columns like this:
And you can get what you want, like this:
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, hungryhippos1
According to your description, you want to calculate the dynamic average value of datediff between the [startdate] and the selected date in Slicer, you can follow my steps:
- Create these two measures:
Datediff =
var _selecteddate=SELECTEDVALUE(Table2[Date])
var _datediff=DATEDIFF(MAX('Table1'[startdate]),_selecteddate,DAY)
return
_datediffAverage of datediff = AVERAGEX(values('Table1'[startdate]),[Datediff])
- Create a Slicer and place ‘Table2’[Date], a table and place columns like this:
And you can get what you want, like this:
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.