Forum Discussion

Grizzlydad's avatar
Grizzlydad
Helper I
6 years ago
Solved

Custom Column Formula Time to total minutes only

Hi all Hopefully this is very simple to do, I want the Mins column below to have a time value shown in minutes only so where there is an hour value it should count as total minutes,  most of them in...
  • AlB's avatar
    AlB
    6 years ago

    Grizzlydad 

    Copy the previous code in a blank query so that you can see the steps and from there adapt it to what you have.

    The code for the calculated column is:

    Number.From(Text.Split([Time],":"){0})*60 + Number.From(Text.Split([Time],":"){1})

    Please mark the question solved when done and consider giving kudos if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers 

     

  • dax's avatar
    dax
    6 years ago

    Hi Grizzlydad , 

    You could refer to AlB 's suggestion. I think you might use code like below in custom column, so you will get table instead of column value.

    You  need to change this like below

    Check code in Advanced Editor to see whether is similar to AlB 's code. Or you could upload your M code, then we will try to test this in my environment

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.