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.
Hi,
I've two sources "querry1" and "querry2".
Querry1 contains a lot of columns but three of them are "action_1_byuserID", "action_2_byuserID" and "action_3_byuserID".
Querry 2 contain a column "userID".
I would like to add a new column when the result is true when (querry1[action_1_byuserID] = querry2[UserId]) AND (querry1[action_2_byuserID] = querry2[UserId]) AND (querry1[action_3_byuserID] = querry2[UserId]).
Sure I could use three merge querry to solve it, but there is may be a better way, no?
Some one can help me ?
Solved! Go to Solution.
@efhache ,
DAX
new column in query 1 =
var _cnt = countx(Filter(querry2, querry1[action_1_byuserID] = querry2[UserId] && querry1[action_2_byuserID] = querry2[UserId] && querry1[action_3_byuserID] = querry2[UserId]), querry2[UserId])
return
if(isblank(_cnt), false(), True())
DAX
new column in query 2 =
var _cnt = countx(Filter(querry1, querry1[action_1_byuserID] = querry2[UserId] && querry1[action_2_byuserID] = querry2[UserId] && querry1[action_3_byuserID] = querry2[UserId]), querry1[action_3_byuserID] )
return
if(isblank(_cnt), false(), True())
@efhache ,
DAX
new column in query 1 =
var _cnt = countx(Filter(querry2, querry1[action_1_byuserID] = querry2[UserId] && querry1[action_2_byuserID] = querry2[UserId] && querry1[action_3_byuserID] = querry2[UserId]), querry2[UserId])
return
if(isblank(_cnt), false(), True())
DAX
new column in query 2 =
var _cnt = countx(Filter(querry1, querry1[action_1_byuserID] = querry2[UserId] && querry1[action_2_byuserID] = querry2[UserId] && querry1[action_3_byuserID] = querry2[UserId]), querry1[action_3_byuserID] )
return
if(isblank(_cnt), false(), True())
Thanks a lot for the help
Indeed via DAX... it's analysis. Thanks, it helps, just change AND by OR and works for me
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 |
---|---|
97 | |
96 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |