Forum Discussion
oveloz
5 years agoNew Member
Need help with Dax πππ»
Hi guys, for days I have been trying to recreate a formula in Excel with Dax but I have not had any luck The formula is a Vlookup inside an iferror that shows me the date of the last meal when the L...
- 5 years ago
With this model
and this measure
Previous date for Lote = VAR Lote = MAX ( 'Dim Lote'[Lote] ) VAR CalcDate = MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Fecha Comida] < MAX ( 'Table'[Fecha Comida] ) && 'Table'[Lote] = Lote ), 'Table'[Fecha Comida] ) RETURN CALCULATE ( MAX ( 'Calendar Table'[Date] ), FILTER ( ALL ( 'Calendar Table' ), 'Calendar Table'[Date] = CalcDate ) )You will get
I've attached the sample PBIX file
PaulDBrown
Community Champion
5 years agoPlease share some sample data or a PBIX file
oveloz
5 years agoNew Member
- PaulDBrown5 years ago
Community Champion
With this model
and this measure
Previous date for Lote = VAR Lote = MAX ( 'Dim Lote'[Lote] ) VAR CalcDate = MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Fecha Comida] < MAX ( 'Table'[Fecha Comida] ) && 'Table'[Lote] = Lote ), 'Table'[Fecha Comida] ) RETURN CALCULATE ( MAX ( 'Calendar Table'[Date] ), FILTER ( ALL ( 'Calendar Table' ), 'Calendar Table'[Date] = CalcDate ) )You will get
I've attached the sample PBIX file
- oveloz5 years agoNew Member
Thanks!