Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

CountIf-Type Function in DAX

Schedule table Schedule date Lot number 10252021 12345 10252021 23456   Production table Production start date Lot number 10252021 12345 10262021...
  • VahidDM's avatar
    4 years ago

    Hi Anonymous 

     

    Try this measure:

    Measure = 
    VAR _A =
        FILTER (
            ADDCOLUMNS (
                production_data,
                "Sche-Date",
                    LOOKUPVALUE (
                        schedule_date[Schedule date],
                        schedule_date[Lot number], production_data[Lot number]
                    )
            ),
            [Production start date] = [Sche-Date]
        )
    RETURN
        COUNTROWS ( _A )

     

    Output:

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!!