Forum Discussion
Anonymous
8 years agoNot applicable
How to Compare two date fields?
I want to compare two date fields or set a value in the "Distancia" field when is showing the oldest date field ("Fecha"). I have this: 'Registro Diario' is a table. A column called "Fecha" and...
- 8 years ago
Anonymous
Hi, instead of using a calculated column you need to use a measure
D2 = IF ( MIN ( 'Registro Diario'[Fecha] ) = [Prueba]; 0; 1 )
Regards
Victor
MFelix
8 years agoSuper User
Hi Anonymous,
Is Distancia KM a measure or a column?
Try to change it to this measure:
Distancia (KM) = IF(MAX('Registro Diario'[Fecha])=[Prueba];0;1)Regards,
MFelix
- Anonymous8 years agoNot applicable
Hi MFelix, thanks for answering
It doesn't work, I shows the following
"Distancia (KM)" is a column of type "Whole number" and format "Decimal Number", "Fecha" is a column of type "Date" and format (d/MM/yyyy), "Prueba" is a measure without type and format (d/MM/yyyy)
- MFelix8 years agoSuper User
Hi Anonymous,
can you share a sample of the PBIX file?
Regards,
MFelix
- Anonymous8 years agoNot applicable