Forum Discussion
need help with DAX calculation
- Anonymous1 year ago
Hi Gonast
If you want a measure, check this:
ULTIMA FECHA = VAR vDate = SELECTEDVALUE(SalidasLima[FECHA]) RETURN CALCULATE(MAX(SalidasLima[FECHA]), ALLEXCEPT(SalidasLima,SalidasLima[PLACA1]),SalidasLima[FECHA]<vDate)Model:
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Thanks for your answers, but it didn't work. Let me explain, for this exercise I have 2 tables. A table called "SalidasLima" where I have the columns FECHA, PLACA1, COD_VIAJE; and the other table is a date table called "Date".
For this exercise I am using a filter with Date where I can select any date, and as a result it should give me the table of the initial image, where the FECHA column corresponds to the filter selection, the PLACA1 column tells me the identification of the vehicle that leaves on the date I selected and the yellow column should indicate the last previous date that the selected vehicle left.
- Anonymous1 year agoNot applicable
Hi Gonast
If you want a measure, check this:
ULTIMA FECHA = VAR vDate = SELECTEDVALUE(SalidasLima[FECHA]) RETURN CALCULATE(MAX(SalidasLima[FECHA]), ALLEXCEPT(SalidasLima,SalidasLima[PLACA1]),SalidasLima[FECHA]<vDate)Model:
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!- Gonast1 year agoNew Member
Thanks you very much!