Forum Discussion
wongts_nms
1 year agoNew Member
Match 2 Tables using Measure (with conditions)
Hi, Expert, I wish to create a measure in the Power BI to match the following condition but unable to get the correct matching: I have 2 tables: Bank and GL In the bank table, there is a dep...
- 1 year ago
wongts_nms try with:
IsBankMatched =
VAR SelectedBankIn = SELECTEDVALUE(Bank[In])
VAR GLTotal =
CALCULATE(
SUM(GL[Debit]),
FILTER(
GL,
GL[Clean Ref Numeric] = SelectedBankIn
)
)
RETURN
IF(
NOT ISBLANK(SelectedBankIn)
&& ABS(GLTotal - SelectedBankIn) < 0.01,
"Matched",
"Not Matched"
)BBF
💡 Did I answer your question? Mark my post as a solution!
👍 Kudos are appreciated
🔥 Proud to be a Super User!
- 1 year ago
Try and see if this works:
IsBankMatched = VAR _BankIn = SELECTEDVALUE(Bank[In]) VAR _Date = SELECTEDVALUE(Bank[Date]) VAR GLTotal = CALCULATE( SUM(GL[Debit]), FILTER( ALL(GL), GL[Clean Ref Numeric] = _BankIn && GL[Date] = _Date) ) -- RETURN IF( NOT ISBLANK(_BankIn) && NOT ISBLANK(_Date) && ABS(GLTotal - _BankIn) < 0.01, -- RETURN IF ( HASONEVALUE ( Bank[In]) && HASONEVALUE(Bank[Date]) && ABS(GLTotal - _BankIn) < 0.01, RETURN IF( ABS(GLTotal - _BankIn) < 0.01, "Matched", "Not Matched" )ALL(GL) or ALLSELECTED(GL) based on your needs, if the above formula works!
v-echaithra
Community Support
1 year agoHi wongts_nms ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.