Forum Discussion

Baji_Komara's avatar
Baji_Komara
Frequent Visitor
3 years ago
Solved

IF condition for two different tables

Hi, I have 2 tables conatining data of 6 months , I'm trying to apply the if condition for two different tables, Table A containig unique(not repeating) coustomer ID's and the Table B containing rep...
  • v-yinliw-msft's avatar
    3 years ago

    Hi Baji_Komara ,

     

    You can try these methods:

     

    Method1:

    New columns like:

    Apri month =
    IF (
        MONTH ( 'TableA'[Financial Month] ) = 4,
        CALCULATE (
            SUM ( TableB[purchase_amount] ),
            FILTER (
                'TableB',
                MONTH ( 'TableB'[Financial Month] ) = 4
                    && 'TableA'[CLAIM_NO] = 'TableB'[CLAIM_NO]
            )
        )
    )
    

     

    Method2: Use matrix visual.

    Hope this helps you.

     

    Here is my PBIX file.

     

    Best Regards,

    Community Support Team _Yinliw

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.