Forum Discussion

ryan-gao's avatar
ryan-gao
Helper III
9 years ago
Solved

userelationship puzzel

  I want to use the expand table of "control" and "date" to filter "bg", at the same time ,blocking the relationship between date  and product ,how to write the formula? thanks!
  • v-huizhn-msft's avatar
    v-huizhn-msft
    9 years ago

    Hi ryan-gao,

    For the count_p_rel measure, you use USERELATIONSHIP(bg[date_b],'date'[date]), which is only used relationship between bg[date_b] and 'date'[date]. While you calculate COUNTROWS('product'), which is not effected by USERELATIONSHIP(bg[date_b],'date'[date]). Only when you calculate COUNTROWS(bg) or COUNTROWS('date'), USERELATIONSHIP(bg[date_b],'date'[date]) can take effect.

    Best Regards,
    Angelia