Forum Discussion

Sno_93's avatar
Sno_93
Frequent Visitor
4 months ago
Solved

undefi

Hi Everyone,   I have two tables: Targets and Sales. Targetsis a lookup table and contains monthly target for values, and includes columns Country and Brand. Sales is my fact table and contains all...
  • krishnakanth240's avatar
    4 months ago

    Hi Sno_93 

    You cannot have both Country and Brand relationships active at the same time and USERELATIONSHIP only activates one and not both. You can handle in DAX by applying both filters using TREATAS which simulates a multi column relationship.

    Turnover_Target =CALCULATE(

    SUM('Targets'[Turnover_Target]) / 4,

    TREATAS(VALUES('Sales'[Country]), 'Targets'[Country]),TREATAS(VALUES('Sales'[Brand]), 'Targets'[Brand]))

    It allows the measure to respond to both Country and Brand filters without needing multiple active relationships