Forum Discussion
BramSegers
7 years agoFrequent Visitor
Recurrent checks possible?
Hi, I'm struggling for a few days with a problem, which I hope can be resolved here :smileyvery-happy: I've got a dataset with different traces, including for each trace a Vehicle Codes, D...
- Anonymous7 years ago
Hi BramSegers,
Actually, I still not so sure for your summarize logic, can you please explain more about this with some expect result?
I create a summarize table with ranking column to summarize your records, below is the sample formulas.
Calculate table:
Table = VAR temp = SUMMARIZE ( ADDCOLUMNS ( FILTER ( data, [type] IN { 1, 2} ), "DateTime", DATEVALUE ( [Datum] ) + TIMEVALUE ( [Tijdstip] ) ), [DateTime], [Voertuig Korte Naam], [Action Code], [type] ) RETURN FILTER ( ADDCOLUMNS ( temp, "Count", COUNTX ( FILTER ( temp, [Action Code] = EARLIER ( [Action Code] ) && [Voertuig Korte Naam] = EARLIER ( [Voertuig Korte Naam] ) ), [type] ) ), [Count] > 1 ) Calculate column: Rank = COUNTROWS( FILTER ( ALLSELECTED ( 'Table' ), [Voertuig Korte Naam] = EARLIER( 'Table'[Voertuig Korte Naam] ) && ISONORAFTER ( [DateTime], EARLIER ( 'Table'[DateTime] ), ASC, [Count], EARLIER ( 'Table'[Count] ), ASC ) ) )
Measure: FirstRank = var list=CALCULATETABLE(VALUES('Table'[Rank]),ALLSELECTED('Table'),VALUES('Table'[Voertuig Korte Naam])) return if( MAX('Table'[Rank]) = MINX(list,[Rank]),"Y","N")Regards,
Xiaoxin Sheng
Anonymous
7 years agoNot applicable
Hi BramSegers,
Actually, I still not so sure for your summarize logic, can you please explain more about this with some expect result?
I create a summarize table with ranking column to summarize your records, below is the sample formulas.
Calculate table:
Table = VAR temp = SUMMARIZE ( ADDCOLUMNS ( FILTER ( data, [type] IN { 1, 2} ), "DateTime", DATEVALUE ( [Datum] ) + TIMEVALUE ( [Tijdstip] ) ), [DateTime], [Voertuig Korte Naam], [Action Code], [type] ) RETURN FILTER ( ADDCOLUMNS ( temp, "Count", COUNTX ( FILTER ( temp, [Action Code] = EARLIER ( [Action Code] ) && [Voertuig Korte Naam] = EARLIER ( [Voertuig Korte Naam] ) ), [type] ) ), [Count] > 1 ) Calculate column: Rank = COUNTROWS( FILTER ( ALLSELECTED ( 'Table' ), [Voertuig Korte Naam] = EARLIER( 'Table'[Voertuig Korte Naam] ) && ISONORAFTER ( [DateTime], EARLIER ( 'Table'[DateTime] ), ASC, [Count], EARLIER ( 'Table'[Count] ), ASC ) ) )
Measure: FirstRank = var list=CALCULATETABLE(VALUES('Table'[Rank]),ALLSELECTED('Table'),VALUES('Table'[Voertuig Korte Naam])) return if( MAX('Table'[Rank]) = MINX(list,[Rank]),"Y","N")
Regards,
Xiaoxin Sheng
- BramSegers7 years agoFrequent Visitor
Thanks, with this help I found a way out!