Forum Discussion
RDA_PowerBI
8 years agoFrequent Visitor
DAX Calculating Status Duration and Averages
Hi, I am looking for some input on calculating status duration and averages. We have a table that takes a snapshot of each serial no. daily and what status it is in. Currently 50 million + rows. ...
- 8 years ago
Zubair_Muhammad
Community Champion
8 years ago
Try this column
Column =
VAR PR =
TOPN (
1,
FILTER (
'Fixed Asset History',
[Serial No] = EARLIER ( [Serial No] )
&& [Status] = EARLIER ( [Status] )
&& [Date of Record] < EARLIER ( [Date of Record] )
),
[Date of Record], ASC
)
VAR Pdate =
MINX ( PR, [Date of Record] )
RETURN
IF ( ISBLANK ( PDate ), 1, DATEDIFF ( Pdate, [Date of Record], DAY ) + 1 )Zubair_Muhammad
Community Champion
8 years ago