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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.