Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a dataset as following, the columns are GroupA, GroupBId, Datetime, TimeDiff, Marker from left to right. This is a nested data. The data is grouped by [GroupA] and then [GroupBId], after that, it is sorted by [Datetime] (ascending).
[TimeDiff] is calculated by having [Datetime] subtract the previous row. I need to break [GroupB] to two whenever [TimeDiff] is longer than 15 min. I have created [Marker] to help me identify where to break the group. Basically starting from [Marker] = 'Break' to [Marker] = 'Start' (but not include that row), I will need to assign [GroupBId] a different name, and it will be a combination as [GroupBId] + '-2'. Like the following.
Is it possible to be done in Query M, or Power BI at all?
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
It worked perfectly. Thank you!
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |