Forum Discussion
Baji_Komara
3 years agoFrequent Visitor
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...
- 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.
v-yinliw-msft
Community Support
3 years agoHi 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.
Baji_Komara
3 years agoFrequent Visitor
hi v-yinliw-msft ,
Thanks for your response and the solution