Forum Discussion

AnetaK's avatar
AnetaK
Icon for Helper V rankHelper V
6 years ago
Solved

DAYS360 in PBI

Hello,

I need to replicate a function 360DAYS from Excel. 

What function should I use in PBI (preffered in Power Query) to receive values from column DAYS?

 

 

  • Hi, AnetaK 

     

    In Power Query, you may create a custom column with the following codes. The pbix file is attached in the end.

     

    =Duration.Days([End]-[Start])

     

    Result:

     

    Best Regards

    Allan

     

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

     

3 Replies

  • v-alq-msft's avatar
    v-alq-msft
    Icon for Community Support rankCommunity Support

    Hi, AnetaK 

     

    In Power Query, you may create a custom column with the following codes. The pbix file is attached in the end.

     

    =Duration.Days([End]-[Start])

     

    Result:

     

    Best Regards

    Allan

     

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

     

    • RoyAndreyRS's avatar
      RoyAndreyRS
      Regular Visitor
      Diferencia_Dias360 =
      VAR DifYear = YEAR('Table'[Start]) - YEAR('Table'[End])
      VAR DifMonth = MONTH('Table'[Start]) - MONTH('Table'[End])
      VAR DifDay = DAY('Table'[Start]) - DAY('Table'[End])

      RETURN
         ABS( DifYear * 360 + DifMonth * 30 + DifDay)