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.
hello
I would like to create a column that gives a TRUE/FALSE result when looking at matching criteria in other rows in a table.
I would like to check if a USER_ID, LOCATION_ID & DATE match. The Result would look like the below table. Rows 1 & 2 have the same criteria, so the answer is TRUE
Thanks
USER_ID | LOCATION_ID | DATE | TRUE/FALSE |
1 | 5 | 01/01/2022 | TRUE |
1 | 5 | 01/01/2022 | TRUE |
3 | 3 | 01/01/2022 | FALSE |
4 | 3 | 01/01/2022 | FALSE |
Solved! Go to Solution.
Hi @Anonymous ,
Please create a column as below:-
TRUE/FALSE =
VAR result =
COUNTROWS (
FILTER (
'Table (4)',
'Table (4)'[USER_ID] = EARLIER ( 'Table (4)'[USER_ID] )
&& 'Table (4)'[LOCATION_ID] = EARLIER ( 'Table (4)'[LOCATION_ID] )
&& 'Table (4)'[DATE] = EARLIER ( 'Table (4)'[DATE] )
)
)
RETURN
IF ( result > 1, TRUE (), FALSE () )
Output;-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Anonymous ,
Please create a column as below:-
TRUE/FALSE =
VAR result =
COUNTROWS (
FILTER (
'Table (4)',
'Table (4)'[USER_ID] = EARLIER ( 'Table (4)'[USER_ID] )
&& 'Table (4)'[LOCATION_ID] = EARLIER ( 'Table (4)'[LOCATION_ID] )
&& 'Table (4)'[DATE] = EARLIER ( 'Table (4)'[DATE] )
)
)
RETURN
IF ( result > 1, TRUE (), FALSE () )
Output;-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
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 |