Forum Discussion

ChrisR22's avatar
ChrisR22
Icon for Helper III rankHelper III
1 year ago
Solved

Measure not abiding by filters

Hello,   I have a measure that compares the values of two columns from different tables, and returns whether the values match or not. PCAP Amount Match = var _Table1 = SUM(Table1[Amount]) var ...
  • ArtisanAmbrosia's avatar
    ArtisanAmbrosia
    1 year ago

    Gotcha, I missed that part! 
    I think the KEEPFILTERS function should do the trick. Something like:

    PCAP Amount Match =
    VAR _Table1 = CALCULATE(SUM(Table1[Amount]), KEEPFILTERS(Table1[FieldA]))
    VAR _Table2 = CALCULATE(SUM(Table2[PCAP Amount]), KEEPFILTERS(Table2[FieldA]))
    return
    IF(ROUND(_Table1, 2) = ROUND(_Table2,2), "Match""Break")