Forum Discussion
StephenK2022
4 years agoFrequent Visitor
Maximum Time in mins based on date range from slicer
Hi all, First time using this forum so I hope I'm posting in the right place. I am trying to work out how to dynamically change the amount of minutes in a day based on the date range chosen i...
- 4 years ago
StephenK2022
Yes becuase DATEDIFF return 0 for the same date difference. Please tryLogged mins vs total mins (Total Accounted for Mins minus Average of TOTAL MINUTES) = VAR FirstDateInFilter = MINX ( ALLSELECTED ( '24hr production report'[Dates] ), '24hr production report'[Dates] ) VAR LastDateInFilter = MAXX ( ALLSELECTED ( '24hr production report'[Dates] ), '24hr production report'[Dates] ) VAR TotalMinutes = DATEDIFF ( FirstDateInFilter, LastDateInFilter + 1, MINUTE ) VAR AccountedMinutes = SUM ( '24hr production report'[Total Accounted for Mins] ) RETURN ABS ( TotalMinutes - AccountedMinutes )
tamerj1
Community Champion
4 years agoHi StephenK2022
Nice chart!
It seems you are utilizing calculated columns which cannot be dynamic. You need to use measures instead. Please provide more details and a sample data along with the expected results.