Forum Discussion

maurcoll's avatar
maurcoll
Icon for Helper IV rankHelper IV
2 years ago

start a matrix table at 7am

Hi I have a matrix table that has hours in the column and store in the row with a count of employees as the value

Currently it defaults to start at midnight through to 11pm. I want it to start at 7am through to 6am. Is there a way to do this.

 

store01234567
A101512108589

 

store7891011121314
A9201510151889

 

Thank you

7 Replies

  • yes, read about "Sort a column by another column".  This assumes you have a dedicated hour column in your table.

  • You can create a calculated column that adjusts the hour values to fit the desired range :

     

    ShiftedHour = 
        IF(
            'Table'[Hour] >= 7, 
            'Table'[Hour] - 7, 
            'Table'[Hour] + 17
        )

     

    Now you can use the ShiftedHour column instead of the original hour column.

  • Hi that works as it renames the 6 to 23 which is what i need but i still need to use the original column in my matrix and sort by that so in the matrix the 6 still needs to show as 6 not 23.
    This is what i need it to look like, hours from midnight to 6am are from the following day. so i need the day to start at 7 am through to 6 am the next day on each row. Hope that makes sense. I have tried creating a conditional column and sort by but that doesnt seem to work either. The hour column how it is imported from teh DWH is stored as a number and i cant amend that.

     78910111213141516171819202122230123456
    11/07/2024                        
    12/07/2024                        
    13/07/2024                        
    14/07/2024                        
    15/07/2024                        
    16/07/2024