Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Dear All,
I am facing an issue. I need to rank my groups by categorizing them on who used the device first. For example, if group 1 used the device on 5:00 PM on given day and if group B used the device at 5:30 on the same day, then group 1 should be ranked 1 and group 2 should be ranked 2.
Here is the sample data. Help would be highly appreciated.
Thank You,
Kumar Ashwarya
Solved! Go to Solution.
Hi @Kumar11109,
Try this:
Create a calculated table
EarliestAccess = //creates a calculated table that summarizes device the original table by DeviceID and Group ID then adds a new column that returns the earliest access date of a group per device ADDCOLUMNS ( SUMMARIZE ( 'Table', 'Table'[DeviceId], 'Table'[GroupId] ), "Earliest Access", CALCULATE ( MIN ( 'Table'[StartDateTime] ), ALLEXCEPT ( 'Table', 'Table'[GroupId], 'Table'[DeviceId] ) ) )
Then in that calculated table, create a calculated column for rank.
RANK = CALCULATE ( COUNTROWS ( 'EarliestAccess' ), ALLEXCEPT ( 'EarliestAccess', 'EarliestAccess'[DeviceId] ), 'EarliestAccess'[Earliest Access] <= EARLIER ( 'EarliestAccess'[Earliest Access] ) )
hope this helps !
I don't think so it's working. I want the ranking for groups, by time, when they accessed the same device.
Hi @Kumar11109,
Try this:
Create a calculated table
EarliestAccess = //creates a calculated table that summarizes device the original table by DeviceID and Group ID then adds a new column that returns the earliest access date of a group per device ADDCOLUMNS ( SUMMARIZE ( 'Table', 'Table'[DeviceId], 'Table'[GroupId] ), "Earliest Access", CALCULATE ( MIN ( 'Table'[StartDateTime] ), ALLEXCEPT ( 'Table', 'Table'[GroupId], 'Table'[DeviceId] ) ) )
Then in that calculated table, create a calculated column for rank.
RANK = CALCULATE ( COUNTROWS ( 'EarliestAccess' ), ALLEXCEPT ( 'EarliestAccess', 'EarliestAccess'[DeviceId] ), 'EarliestAccess'[Earliest Access] <= EARLIER ( 'EarliestAccess'[Earliest Access] ) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
58 | |
56 | |
38 | |
29 |
User | Count |
---|---|
75 | |
62 | |
45 | |
40 | |
39 |