Forum Discussion

tomcch's avatar
tomcch
Frequent Visitor
2 years ago
Solved

Build Relationship with Multiple Date Field (Larger and Smaller Than)

Hello all,   The main table is Sales Volume Table, I would like to join it to the Sales Incentive Table to get the STAFF name by joining 1) Customer Column (this one is simple), 2) the [SALES VOLUM...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi tomcch ,

    You can create a calculated column as below in the table 'Sales Volume' to get it, please find the details in the attachment.

    Column = 
    CALCULATE (
        MAX ( 'Sales Incentive'[STAFF] ),
        FILTER (
            'Sales Incentive',
            'Sales Incentive'[CUSTOMER] = 'Sales Volume'[CUSTOMER]
                && 'Sales Volume'[DATE] > 'Sales Incentive'[FROM DATE]
                && 'Sales Volume'[DATE] < 'Sales Incentive'[TO DATE]
        )
    )

    Best Regards