Forum Discussion

Freeseman's avatar
Freeseman
Helper II
4 years ago
Solved

Minutes into Hours

Hi,

 

I am struggling to change minutes into hours for the duration column.

What query can i write.

Table name is EQUIPMENT_STATUS_SUMMARY

 

 

  • This looks like your DAX screen. 

    For DAX, you can use following formula to convert mins into hours

    =[DURATION]/60

    In PQ, you can use following

    1. If you need this value in a different column

    = [DURATION]/60

    2. If you want to replace within column itself wjere #"Changed Type" would need to be replaced with your last step

    = Table.ReplaceValue(#"Changed Type",each [DURATION],each [DURATION]/60,Replacer.ReplaceValue,{"DURATION"})

2 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    This looks like your DAX screen. 

    For DAX, you can use following formula to convert mins into hours

    =[DURATION]/60

    In PQ, you can use following

    1. If you need this value in a different column

    = [DURATION]/60

    2. If you want to replace within column itself wjere #"Changed Type" would need to be replaced with your last step

    = Table.ReplaceValue(#"Changed Type",each [DURATION],each [DURATION]/60,Replacer.ReplaceValue,{"DURATION"})

    • Freeseman's avatar
      Freeseman
      Helper II

      Thank you. I add custom column and did what you mentioned. It worked.

      =[DURATION]/60