Home Forums Power BI Date in custom text

Tagged: , ,

This topic contains 0 replies, has 1 voice, and was last updated by  Chelena 1 year, 4 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #9088

    • Started: 1
    • Replies: 0
    • Total: 1

    Good day

    I’m a working with pediatric data. I want the column to display age “2y; 1m; 4d” from age in days. My excel recipe for this is as follows, it works fine:

    =INT([@Age]/365.2425)&”y; ”
    & INT(([@Age]-INT([@Age]/365.2425)*365.2425)/30.44)&”m; ”

    I tried to do the following and it failed:

    =Int64.From([Age]/365.2425)&”y; ”
    & Int64.From(([Age]-Int64.From([Age]/365.2425)*365.2425)/30.44)&”m; ”

    I will add the solution to my personal cookbook because I use it repeatedly for all sorts of dates.

    Thank you for your time!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.