Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Missing values when grouping

Hello everone. First post - tell me if i'm doing smth wrong-   I am currently working on a quarterly report where I have to group a lot of data (45.000 rows by 85 columns) by date into groups of fo...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    One possible way to do that is to use DAX formulas to create a new column that assigns each date to a specific interval based on your criteria.

    To use DAX formulas, you need to:

    Select your data and go to Modeling > New Column.
    Create two columns:

    Date1 = [Date]-10/24

     

    Date Interval = SWITCH(TRUE(),
    
    'Table'[Date1] >= DATE(2021,6,1) && 'Table'[Date1] < DATE(2021,10,1), "Jun-Oct 2021",
    
    'Table'[Date1] >= DATE(2021,10,1) && 'Table'[Date1] < DATE(2022,2,1), "Oct-Feb 2022",
    
    ......
    
    )
    

     

     

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.