Forum Discussion
Anonymous
4 years agoNot applicable
Help with Dax code
Hi all I am trying to write a dax code that looks down [flight_primary_document_number] for duplicates and then looks at [flight_date] to see if the duplicates have the same flight date. Any suggesti...
vojtechsima
4 years agoSuper User
Hi, Anonymous
You can also use a measure like this:
IsDifferentDate =
var currentNumber = SELECTEDVALUE(Flights[Number])
var summaryTable = CALCULATETABLE( SUMMARIZE( Flights, Flights[FlightDate]), REMOVEFIlTERS(Flights), Flights[Number] = currentNumber)
return IF ( COUNTROWS( summaryTable ) >= 2, "Yes", "No")
Credit to johnt75 .