Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Guys,
trying to find a solution for finding a value in 2 different tables.
Table 1 has values (could be multiple devided by a ",")
Table 2 has values
Whats the best way to check if the exact values from the second table are also available in the first table?
Solved! Go to Solution.
Hi, @01_RAF_01
Please try formula as below:
Measure1 =
CONTAINSSTRING (
CONCATENATEX ( VALUES ( Table1 ), Table1[Value], "," ),
MAX ( Table2[Value] )
)
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @01_RAF_01
Please try formula as below:
Measure1 =
CONTAINSSTRING (
CONCATENATEX ( VALUES ( Table1 ), Table1[Value], "," ),
MAX ( Table2[Value] )
)
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @01_RAF_01 ,
Spontaneously, I'd suggest the CONTAINS function in DAX.
Here the MS documentation.
And here a post with an example.
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! |
#proudtobeasuperuser |
Well, first you should get rid of the commas in Power Query and split the values so that in the underlying table exists a column with just the atomic values. Once you have it, it'll be soooooo much easier to match one value against the other. Bear in mind that you don't have to get rid of the original column from the underlying table. You can still keep it.
However, right now it's a bit obscure what you're after. Is it a measure of some kind? Is it a calculated column? I don't know.
User | Count |
---|---|
55 | |
22 | |
18 | |
16 | |
11 |
User | Count |
---|---|
83 | |
54 | |
39 | |
21 | |
15 |