The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I want value
IF (table1.column1 = table1.column2), THEN (table2.column1) ELSE blank text.
Please specify if tabel1 and table 2 must have relationship.
@tamerj1 can you help?
Solved! Go to Solution.
Hi @Vishal_2202 ,
I created some data:
Table1:
Table2:
Two tables don't necessarily need to be related, you can use the Lookvalue() function
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
Here are the steps you can follow:
1. Create calculated column.
Flag =
IF(
'Table1'[Column1]='Table1'[Column2] ,
LOOKUPVALUE('Table2'[Value],'Table2'[GroupTable2],'Table1'[Column1]),BLANK())
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Vishal_2202 ,
I created some data:
Table1:
Table2:
Two tables don't necessarily need to be related, you can use the Lookvalue() function
LOOKUPVALUE function (DAX) - DAX | Microsoft Learn
Here are the steps you can follow:
1. Create calculated column.
Flag =
IF(
'Table1'[Column1]='Table1'[Column2] ,
LOOKUPVALUE('Table2'[Value],'Table2'[GroupTable2],'Table1'[Column1]),BLANK())
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Vishal_2202
You can write it same way you read it
=
IF ( table1[column1] = table1[column2], table2[column1] )
What about if the condition doesn't satisfy then can we write a specific text like 'BLANK'
And does the tables must have relation
@tamerj1 thanks for quick reply..😊
@Vishal_2202
I just noticed you have edited the post. Yes you need a relationship between the two tables but what would be the filter direction? Blank is returned by default, no need to write it.
Sorry to bother you but the problem is that column1 and column2 from table 1 is measures so it didn't catch the table 2's column.
@Vishal_2202
This is why I'm asking about the direction of the relationship filter?
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
32 | |
14 | |
10 | |
10 | |
9 |