Forum Discussion

ratercero's avatar
ratercero
Helper III
8 years ago
Solved

Formula not showing earliest Value

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...
  • v-jiascu-msft's avatar
    8 years ago

    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
            )
        )
    

    Formula_not_showing_earliest_Value

     

    Best Regards,

    Dale