cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sirros_iot Member
Member

Convert time to seconds

Hello all!

I have a column in the hour format( HH:mm: ss), and I want to show the average of this column, but, I'm connected by DirectQuery, so, no data modeling.

I would like to solve this issue using  just one measure, but I'm having problems with this time format, I can't even convert it into seconds.

Any idea?
Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Convert time to seconds

@sirros_iot

 

Give this a shot

 

Seconds_Measure =
VAR myvalue =
    SELECTEDVALUE ( Table1[Column] )
RETURN
    ( myvalue - TRUNC ( myvalue ) )
        * 86400

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Convert time to seconds

@sirros_iot

 

Give this a shot

 

Seconds_Measure =
VAR myvalue =
    SELECTEDVALUE ( Table1[Column] )
RETURN
    ( myvalue - TRUNC ( myvalue ) )
        * 86400

View solution in original post

Highlighted
sirros_iot Member
Member

Re: Convert time to seconds

Thanks @Zubair_Muhammad! It did work!

Best Regards,
Diego

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 295 members 2,810 guests
Please welcome our newest community members: