Forum Discussion
Matrix Comparison DAX Code
- Anonymous2 years ago
Hi KiliMiyamoto ,
According to your describe, here are my test process
To achieve your goal, you can follow these steps:
Here are my test data
1.Create a calculated table by using DAX
Table 2 = VALUES('Table'[table_of_ID])2.Create one to one relationship between two tables
3.Create a custom column
Column = VAR T = SELECTEDVALUE('Table'[other_table_of_ID]) var N = SELECTEDVALUE('Table'[table_of_ID]) var res = IF(T = N , "Y",BLANK()) RETURN res4.Use table 'Table'[other_table_of_ID] as row, 'Table2'[other_table_of_ID] as column, calculated column as value.
5.Final output
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Hi KiliMiyamoto
What you're looking for is something like this
IF(
ISEMPTY(
INTERSECT(
VALUES(TableOfID[FieldValue])
VALUES(OtherTableOfID[FieldValue])
)
),
BLANK(),
TRUE()
)
I typed this in Notepad so I doubt it's syntatically correct but should get you to where you want to be.
Thank you very much for you response. I can see what your code does and I've tried it with my dataset but it returns this:
Which in fact is the exact same results as my original code, which returns:
I can't share the dataset since it belongs to my company.