Reply
ONT362
Regular Visitor

How to flag and group consecutive dates by employee using either Power Query or Power BI

Hello, I've been struggling to figure out how to how to flag and group consecutive dates by employee, then summing days using either Power Query or Power BI.  I tried using Power Bi but it lead me to a "calculated" column that I cannot chart, filter or do further analysis on. 

 

Help Please  🙂 

 

Data & Output

Screenshot 2023-07-27 105849.png

 

Output

Level 4           Level 3          Level 2                       Full Name           Consecutive Groups    Sum NB Days by Consecutive Groups
Kelly               Sarah            Ashley                            Joan                   3                                            8.5
                                                                             Trisha                      5                                          11.07

 

DATA

Level 4       Level 3       Level 2       Full Name                   Code Date          NB Day    Consecutive Groups    Sum NB Days by Consecutive Groups
Kelly          Sarah         Ashley                Joan                      12/03/22                1   
                                                                                            12/29/22                1                      1                               2
                                                                                            12/30/22                1
                                                                                            4/11/23                0.5
                                                                                            5/02/23                   1
                                                                                            5/11/23                0.5                      2                            2.5
                                                                                            5/12/23                  1
                                                                                            5/13/23                  1
                                                                                            5/15/23                  1                      3                              4
                                                                                            5/16/23                  1
                                                                                            5/17/23                  1
                                                                                            5/18/23                  1
                                                                    Trisha               7/19/22              0.78                      1                           2.92
                                                                                            7/20/22              1.07
                                                                                            7/21/22              1.07
                                                                                            8/12/22              1.07
                                                                                            9/01/22              1.07                       2                          2.14
                                                                                            9/02/22              1.07
                                                                                            10/15/22            0.93                      3                              2
                                                                                            10/16/22            1.07
                                                                                            11/07/22            1.07                      4                           2.14
                                                                                            11/08/22            1.07
                                                                                            11/17/22              0.8                       5                          1.87
                                                                                            11/18/22             1.07

 

0 REPLIES 0
avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)