Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
masifmalik
New Member

Need Help plotting stack graph with seconds converted into Hrs per week.

Hello - i have data in seconds format - which is in whole number. How to i convert it in to Hrs and show it in stacked bar graph by weeks. I have perday data by seconds which i have sorted in weeks.

 

i currenlty used below to convert to Hrs but i am not able to graph it. below is in Text format output.

HH:MM TotalTime =
VAR TotalSeconds = SUM(Merge1[Total Time])  // Replace 'YourTableName' with the name of your table
VAR Hours = INT(TotalSeconds / 3600)
VAR Minutes = INT(MOD(TotalSeconds - (Hours * 3600), 3600) / 60)
RETURN
    FORMAT(Hours, "00") & ":" & FORMAT(Minutes, "00")
1 REPLY 1
Anonymous
Not applicable

Hi @masifmalik ,
Based on the information you provided, the measure you wrote will convert seconds to HH:MM text format, which is not ideal for creating stacked bars.
You can add the measure in Value:

 

 

vyifanwmsft_2-1709174865279.png

 

Final output:

vyifanwmsft_1-1709174744457.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.