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.
My Data looks like this -
I'm trying to find out the people/user-id recently logged in for the recent date.(that are currently inside the building)
A person can have multiple ins and outs.
Any help would be really great.
Thanks,
Anand!
Solved! Go to Solution.
@Anonymous - Try this measure:
In Building =
var _MaxIn = CALCULATE (
MAX ( 'Table'[SCAN_DATE_TIME] ),
'Table'[SCAN_TY] = "IN"
)
var _MaxOut = CALCULATE (
MAX ( 'Table'[SCAN_DATE_TIME] ),
'Table'[SCAN_TY] = "OUT"
)
return _MaxIn > _MaxOut
Create a table visual with the user info and filter it by this new measure.
Hi @Anonymous ,
Try this:
Recent log in =
CALCULATE (
MAX ( 'Table'[SCAN_DATE_TIME] ),
ALLEXCEPT ( 'Table', 'Table'[USER_ID], 'Table'[SCAN_TY] )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your reply.
Since I have multiple Ins and Outs(which is filtered in the picture that I posted) I would like to see the people who are currently inside.
I believe I should compare the max value for in and out ; then if max in is greater that max out - I should be able to name that person as "currently in"
How do I do that?
@Anonymous - Try this measure:
In Building =
var _MaxIn = CALCULATE (
MAX ( 'Table'[SCAN_DATE_TIME] ),
'Table'[SCAN_TY] = "IN"
)
var _MaxOut = CALCULATE (
MAX ( 'Table'[SCAN_DATE_TIME] ),
'Table'[SCAN_TY] = "OUT"
)
return _MaxIn > _MaxOut
Create a table visual with the user info and filter it by this new measure.
Works!
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 |
---|---|
96 | |
93 | |
82 | |
70 | |
64 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |