Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello there
I have a dataset that contains three columns [UserID],[JobType],[JobID]
Is it possible to create a meassure that counts how many row pairs pr. UserID has had the same UserID and JobID, but JobType should be different in the two rows.
I have tried asking ChatGPT and tried googling, but I cant seem to find a way to do it.
I have also tried duplicating my table so I have JobType 1 in the first table and JobType 2 in the second, but I still cant get it to create a correct output.
By any means is it possible?
Solved! Go to Solution.
UserID | JobID | JobType |
10007 | 1084529 | A |
10007 | 921715 | B |
10007 | 967500 | B |
10007 | 936291 | B |
10007 | 933696 | B |
10007 | 930134 | B |
10007 | 913749 | B |
10007 | 1085439 | B |
The first user that pops up with column being 1, yet none of the JobIDs are matching
I don't understand, is this result wrong?
I didn't expect this when I initially asked but if you take a look at this table
UserID | JobID | JobType |
1 | 200 | A |
2 | 300 | A |
1 | 200 | B |
1 | 400 | A |
1 | 400 | B |
1 | 400 | B |
There is a double entry for UserID 1 on JobID 400 with one JobType A and Two JobType B.
Is it possible to ignore the doublet?
At first I tried copying your code into my old measure and that resulted in some weird behavior. I added a new column and pasted the code and it seems to work. Thanks 😄
Hi,
try this:
I don't think that would work. I will try to be as explicit as possible:
Is it possible to create a meassure that counts how many row pairs pr. UserID has had the same UserID and JobID, but JobType should be different in the two rows.
So for Row1 and Row2 UserID should be the same and JobID should be the same, but JobType should be different.
UserID | JobID | JobType |
1 | 200 | A |
2 | 300 | A |
1 | 200 | B |
1 | 400 | A |
1 | 400 | B |
In this case I want the measure to show that UserID 1 has 2 row pairs that match on both UserID and JobID, but different JobType
I hope this makes sense, I am still not sure if it is possible.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.