Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have 2 tables , Table1and Table2.
I require to check whether Table2[Date] exists in Table1 and in case it does then Table2[type] should be Red or else Green.
Solved! Go to Solution.
Hi, @gigotomo
According to your requirement, I think you can achieve this using DAX to create a calculated column in the Table 2 like this:
Type =
IF(
[Date] in SELECTCOLUMNS('Table 1',"1",[Date]),
"Red","Green")
And you can get what you want, like this:
You can download my test pbix file here
More info about SelectColumns() function in DAX
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @gigotomo
According to your requirement, I think you can achieve this using DAX to create a calculated column in the Table 2 like this:
Type =
IF(
[Date] in SELECTCOLUMNS('Table 1',"1",[Date]),
"Red","Green")
And you can get what you want, like this:
You can download my test pbix file here
More info about SelectColumns() function in DAX
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @gigotomo ,
Create a new column with the following DAX:
Flag = If(NOT(ISBLANK(LOOKUPVALUE(Table1[Date],Table1[Date],Table2[Date]))),"Red","Green")
New column in Table 2 =
var _1 = countx(filter(Table1,Table1[Date] =Table2[Date]), Table1[Date])
return
if(isblank(_1), false(), true())
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.