Forum Discussion
Anonymous
6 years agoNot applicable
DAX : Count rows before specific row
Hello, I'm struggling with a DAX (or logic) calculation, I have a 'Qualification' parcel Table which contains these columns : - Event_Biztranslist : ID of parcel - Event_Type : Type of event ...
- 6 years ago
Try this,
Column = VAR Parcel = 'Table'[Event_Biztransit] VAR EventReader = Calculate( MAX( 'Table'[Event_Time] ) , ALL('Table') , 'Table'[Event_Biztransit] = Parcel , Table'[Event_Type] = "ObjectEvent" , Table'[Readpoint_Type] = "Reader") Return IF('Table'[Event_Time]<EventReader , 1 , 0 )
tex628
6 years agoCommunity Champion
Try this,
Column =
VAR Parcel = 'Table'[Event_Biztransit]
VAR EventReader = Calculate( MAX( 'Table'[Event_Time] ) , ALL('Table') , 'Table'[Event_Biztransit] = Parcel , Table'[Event_Type] = "ObjectEvent" , Table'[Readpoint_Type] = "Reader")
Return
IF('Table'[Event_Time]<EventReader , 1 , 0 )
- Anonymous6 years agoNot applicable
Nice it works 🙂
Screenshot tested for another parcel :
Thanks a lot !
Driss
- tex6286 years agoCommunity Champion
No worries! Let me know if there are any other issues.
/ J