Forum Discussion

Libin7963's avatar
Libin7963
Helper II
1 year ago
Solved

Help with table relationship

My relationship looks as below I want to calculate the sum of amount in "Amount" column of Fact table 2 using the "Date Received" in  Fact table 2 using "Date" from Date table in slicer. Since there ...
  • rajendraongole1's avatar
    rajendraongole1
    1 year ago

    Hi Libin7963 - Good to know that, you can use a combination of CALCULATE and INTERSECT or filtering functions that ensure only matching records between the two fact tables are included.

     

    SumAmountRelatedCasesFT2 =
    CALCULATE(
    SUM('Fact Table 2'[Amount]),
    FILTER(
    'Fact Table 2',
    NOT(ISBLANK(LOOKUPVALUE(
    'Fact Table 1'[KeyColumn],
    'Fact Table 1'[KeyColumn], 'Fact Table 2'[KeyColumn]
    )))
    ),
    USERELATIONSHIP('Date'[Date], 'Fact Table 2'[Date Received])
    )

     

    Hope this helps.