Forum Discussion

WIILLLZ's avatar
WIILLLZ
New Member
2 years ago

Duration variable on Y-Axis

 

Hello, 

 

I’m trying to figure out a formula to change my “Duration” variable which is set as a time variable to something numeric that is still readable as hours/minutes to represent on a Column chart on the Y-axis. I believe Power BI can’t do this because the time variable is text when placed into a visualisation. I first formatted my variable to what you see in the “Duration” column, but every formula/ measure I’ve tried has failed.

I’ve attached two screenshots. In the column chart I want my duration variable to reflect the actual time not just as a count.

Thanks for any help, much appreciated 🙏🏼

1 Reply

  • WIILLLZ  Hi! 

    Assuming your "Duration" variable is currently in a time format (HH:mm), you can create a new numeric column or measure using the following formula:

    Numeric Duration = HOUR('YourTable'[Duration]) + MINUTE('YourTable'[Duration]) / 60
     

    BBF