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

Hi All, I have column of time values, but I wanted to have in 1 hour time range like 02 : 03

Dharmendharan_L_0-1688371079432.png

Dharmendharan_L_1-1688371158768.png

Hi, The first image is the time column I have, i wnated to have it time range (02:03)like the second image. Please share your ideas to achieve this. Thanks

@amitchandak 

1 ACCEPTED SOLUTION

not sure if I understood you correctly but look at the file

https://1drv.ms/u/s!AiUZ0Ws7G26RiTiUwvgeGUU22U3M?e=40kAmG

View solution in original post

6 REPLIES 6

@Ahmedx Thank you so much for spending your time and helping me out. I can create a table using this query. How can I create a calculated colum in the fact table using the hour column?.

Can you please share your demo input and expected output!

Dharmendharan_L_0-1688552303903.png

The first image is the input i have in a table, its an hour column.

 

Dharmendharan_L_1-1688552385080.png

I want an calculated column in the same table showing time range like the 2nd image for the Input( 1st image).

Thanks @Ahmedx 

not sure if I understood you correctly but look at the file

https://1drv.ms/u/s!AiUZ0Ws7G26RiTiUwvgeGUU22U3M?e=40kAmG

Dharmendharan_L_0-1688563235416.png

Thank you so much @Ahmedx , This is what i wanted exactly.👏

Ahmedx
Super User
Super User

pls try this

TimePriod = 
SELECTCOLUMNS (
    ADDCOLUMNS (
        GENERATESERIES ( TIME ( 0, 0, 0 ), TIME ( 23, 0, 0 ), TIME ( 1, 0, 0 ) ),
        "TimePriod",
            FORMAT ( [Value], "hh:mm" ) & " - "
                & FORMAT ( [Value] + TIME ( 1, 0, 0 ), "hh:mm" )
    ),
    "TimePriod", [TimePriod]
)

Screen Capture #1365.png

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.