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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
askspepsi
Helper II
Helper II

{Direct Query} Change to Timeformat and Rounddown to nearest.

hi everyone,

I have an data output in my sql table in number format, when trying to calcuate the differentiate output comes in number format but output required is below.

 

11.35 to 11:21 and should rounddown to 11:00

11.65 to 11:39 and should rounddown to 11:30

12:00 to 12:00 and should not rounddown to 12:00

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hello @askspepsi ,

If I got your logic correctly, try the following forms in new columns:

Half hour = 
ROUND('Table'[Value] / 24 * 48,0) / 48 

Desired Output = 
IF(
    MINUTE('Table'[Value] / 24) <= 30 , 
    ROUND('Table'[Value] , 0 ) / 24 , 
    ROUND('Table'[Value] / 24 * 48 , 0 ) / 48
)

10-08-_2020_17-27-03.png

Greetings FrankAT

View solution in original post

4 REPLIES 4
FrankAT
Community Champion
Community Champion

Hello @askspepsi ,

If I got your logic correctly, try the following forms in new columns:

Half hour = 
ROUND('Table'[Value] / 24 * 48,0) / 48 

Desired Output = 
IF(
    MINUTE('Table'[Value] / 24) <= 30 , 
    ROUND('Table'[Value] , 0 ) / 24 , 
    ROUND('Table'[Value] / 24 * 48 , 0 ) / 48
)

10-08-_2020_17-27-03.png

Greetings FrankAT

@FrankAT

sorry for the late reply,

Thanks for the update. this is the extact output i required.

regards

askspepsi

amitchandak
Super User
Super User

@amitchandak 

this is in time format where i cann't change.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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