Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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())
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |