Forum Discussion
Compare two columns in different tables
- 3 years ago
Hi, Anonymous
This occurs primarily because multi-ended tables cannot filter one-ended tables.
Here are the steps you can refer to :
(1)My test data is the same as yours.
(2)We can create three measures :
Value_A = var _aid= SELECTEDVALUE('Central'[ID_Table_A]) var _a_value=MAXX( FILTER(ALL('Table A'), 'Table A'[ID_Table_A] = _aid) ,[Value_A]) var _b = SELECTEDVALUE( 'Table B'[Value_B]) return _a_valueValue_B = var _bid= SELECTEDVALUE('Central'[ID_Table_B]) var _b_value=MAXX( FILTER(ALL('Table B'), 'Table B'[ID_Table_B] = _bid) ,[Value_B]) return _b_valueComparison = IF( [Value_A]= [Value_B] ,"True","False")(3)Then we need to put the 'Central'[ID_Table_A] and 'Central'[ID_Table_B] on the visual , and the three measures then we will meet your need , the result is as follows:
For multi-ended tables, if we need to get the contents of a one-ended table, but we don't want to create new columns to implement it, we need to put the ID of the multi-ended table in the visual.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, Expert,
I also want 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 deposit on 1/4/2025 amounted to RM410 = column Bank[In]
In the GL table, there are 2 transactions on 1/4/2025, one RM214.80, another one RM195.20 which make up of the total of RM410 and these 2 transactions both reference are:
a) 410.00 (numeric) in the column GL[Clean Ref Numeric]
b) 214.80 (one row) and 195.20 (another row) in the column GL[Debit]
My Goal is:
Create a DAX measure or column that matches Bank deposits to grouped GL entries based on total amount and reference number in Clean Ref Numeric.
Created the below DAX but still unable to match:
IsBankMatched =
VAR SelectedBankIn = SELECTEDVALUE(Bank[In])
VAR GLTotal = CALCULATE(SUM(GL[Debit]),
FILTER(GL,GL[Clean Ref Numeric] = SelectedBankIn))
RETURN IF(SelectedBankIn = GLTotal, "Matched", "Not Matched")
Appreciate for the advise.