Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
Im looking to determine the first dyelot nomber produces with a certain color and Yarn lot, the formula keeps showing another dyelot number:
Here is the formula I used:
Yarn First Dye = CALCULATE ( FIRSTNONBLANK ( HILAZA_ACUM[DYELOT]; HILAZA_ACUM[DYELOT] ); CALCULATETABLE ( HILAZA_ACUM; ALLEXCEPT ( HILAZA_ACUM; HILAZA_ACUM[LOTE HILAZA DEPURADO];HILAZA_ACUM[Cod. Color] ); MIN(HILAZA_ACUM[FECHA];HILAZA_ACUM[FECHA]) ) )
This is what I get:
I dont understand why but Ignores values that start with alfabetical caracters and it should not.
Please advise how to resolve.
Best Regards
RT
Solved! Go to Solution.
Hi @ratercero,
Try this formula, please.
Measure = VAR earliestDate = CALCULATE ( MIN ( HILAZA_ACUM[FECHA] ), ALLEXCEPT ( HILAZA_ACUM, HILAZA_ACUM[Cod. Color], HILAZA_ACUM[LOTE HILAZA DEPURADO] ) ) RETURN CALCULATE ( MIN ( HILAZA_ACUM[DYELOT] ), FILTER ( ALLEXCEPT ( HILAZA_ACUM, HILAZA_ACUM[Cod. Color], HILAZA_ACUM[LOTE HILAZA DEPURADO] ), HILAZA_ACUM[FECHA] = earliestDate ) )
Best Regards,
Dale
Hi @ratercero,
Could you please mark the proper answers as solutions?
Best Regards,
Dale
Hi @ratercero,
Try this formula, please.
Measure = VAR earliestDate = CALCULATE ( MIN ( HILAZA_ACUM[FECHA] ), ALLEXCEPT ( HILAZA_ACUM, HILAZA_ACUM[Cod. Color], HILAZA_ACUM[LOTE HILAZA DEPURADO] ) ) RETURN CALCULATE ( MIN ( HILAZA_ACUM[DYELOT] ), FILTER ( ALLEXCEPT ( HILAZA_ACUM, HILAZA_ACUM[Cod. Color], HILAZA_ACUM[LOTE HILAZA DEPURADO] ), HILAZA_ACUM[FECHA] = earliestDate ) )
Best Regards,
Dale
If you mean first Dyelot with regards to FECHA, maybe you could use this:
CALCULATE( FIRSTNONBLANK (HILAZA_ACUM [DYELOT] ) , FILTER ( HILAZA_ACUM, (HILAZA_ACUM [FETCHA] ) = MAX (HILAZA_ACUM [FETCHA] )))
You could just modify it further to achieve what you want. You just have to get the the first data with regards to the date in the table, if that's what you meant by 'first' data.
Hope this helps!