Forum Discussion
Decal
Helper I
1 year agoSlicer using the wrong date of two dates
Hello all, I have a Access db backend for an HR db that for the purposes of this conversation has two dates: approved date and filled date. All positions will have an approved date, but not all ha...
- Anonymous1 year ago
Hi Decal ,
Based on the testing, create the sample table.
Then, using the following DAX formula.
Avg Time = CALCULATE( AVERAGEX( 'PowerBIPosition', DATEDIFF( 'PowerBIPosition'[Approved Date], 'PowerBIPosition'[Fill Date], DAY ) ), FILTER(PowerBIPosition, PowerBIPosition[Fill Date] >= FIRSTDATE(DimDate[Date]) && PowerBIPosition[Fill Date] <= LASTDATE(DimDate[Date]) && NOT(ISBLANK('PowerBIPosition'[Fill Date])) && 'PowerBIPosition'[Fill Status] = "Filled") )Select 2024 year to filter the page. The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
1 year agoHi,
Share the download link of the PBI file. Show the problem there very clearly and also the expected result.
Decal
Helper I
1 year agoSince it's an HR file, I can't provide the whole file, but it can be looked at this way.
| Position | Approved Date | Fill Date | Average Time to Hire | Time to Hire Base |
| 16 | 11/17/2023 | 6/7/2024 | 203.00 | 203.0 |
| 22 | 1/1/2024 | 1/5/2025 | 307.0 |
Even if I'm bypassing all of the date tables, why isn't the Avg Time to Hire calculating?
- danextian1 year ago
Super User
Is that really how your raw data is? You can post a sample data with confidential information removed. That's how most users in the forum do it.