Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Label each sales with different date ranges

Hello My business define each sales by "date_order" and "date_delivery". Therefore, I have a Sales_Table. and a Label_Table The aim is to label the Sales_Table. Here is the expect...
  • v-cherch-msft's avatar
    7 years ago

    Hi Anonymous

     

    You may refer to below measure and drag it for sales table.

    Measure  =
    CALCULATE (
        MAX ( Label[Label] ),
        FILTER (
            GENERATE ( Sales, Label ),
            Sales[Order date] >= Label[OrderDate_start]
                && Sales[Order date] <= Label[OrderDate_end]
                && Sales[Delivery date] >= Label[Delivery date_start]
                && Sales[Delivery date] <= Label[Delivery date_end]
        )
    )

    Regards,

    Cherie