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 All,
Hope someone will be able to help me
Is it possible to group in DAX categories if the time in between > 1 hr? I need to return count, max time and min time
Appreciate any advice
Data:
Name | DateTime |
A | 05/05/2018 06:42 |
A | 05/05/2018 06:43 |
A | 05/05/2018 06:45 |
A | 05/05/2018 06:51 |
A | 05/05/2018 08:43 |
A | 05/05/2018 08:46 |
A | 05/05/2018 15:20 |
A | 05/05/2018 15:22 |
A | 05/05/2018 15:23 |
Expected result:
Name | Count | Min | Max |
A | 4 | 05/05/2018 06:42 | 05/05/2018 06:51 |
A | 2 | 05/05/2018 08:43 | 05/05/2018 08:46 |
A | 3 | 05/05/2018 15:20 | 05/05/2018 15:23 |
Hi @Liwi
Try this calculated table
From the Modelling Tab>>New Table
Table = VAR temp1 = ADDCOLUMNS ( Table1, "Time", HOUR ( Table1[DateTime] ) ) VAR temp2 = SUMMARIZE ( temp1, [Time], Table1[Name], "Count", COUNT ( Table1[DateTime] ), "Min", MIN ( Table1[DateTime] ), "Max", MAX ( Table1[DateTime] ) ) RETURN temp2
Please see attached file
Thank you @Zubair_Muhammad
However you solution gives me max / min / count for each hour while I need to define the groups for each name where the time difference between lines is more than 1 hour, so the difference of MAX of Group 1 - MIN Group 2 > 1 hour.
Perhaps below ilustrates better.
Would you know how to achieve that?
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 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |