Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
maurcoll
Helper II
Helper II

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 7
maurcoll
Helper II
Helper II

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                        

Hi @maurcoll ,


If this error is encountered when sorting by another column, consider creating a custom column in PowerQuery.

vcgaomsft_0-1721886654785.png

if [Hour] >= 7 then [Hour] - 7 else [Hour] + 17

vcgaomsft_2-1721886891810.png

vcgaomsft_3-1721886954190.png

Output:

vcgaomsft_1-1721886854561.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

I am sure that won't be confusing to your report users at all...

Thank you for such a helpful comment

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

AmiraBedh
Most Valuable Professional
Most Valuable Professional

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.


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
lbendlin
Super User
Super User

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

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.