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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Estyfodense
Helper I
Helper I

chart Hours

1º Have to calculate a difference between Final Hour and Start hour, per day.

 

_01Total HH = 
    CALCULATE(
        SUMX('hh tsv','hh tsv'[Final Time]-'hh tsv'[Star Time]),
            'hh tsv'[Action] in{"Production"},'hh tsv'[product] in {"P13"}
            )

 

 

 

2ºAfeter this I will use a matrix to organize the result

So i have to adapt the measure to show right total hour

 

 

 

 

 

 

Total HH = INT('hh tsv'[_01Total HH])*24+FORMAT('hh tsv'[_01Total HH],"hh")&":"&FORMAT('hh tsv'[_01Total HH],"nn")

 

 

 3º after this I calculate the extra hour, to saturday's I have to subtract 04:00hrs the Total HH to other days just 08:00 hrs 

 

_02 Horas extra = [_01Total HH] - IF( WEEKDAY(MAX('hh tsv'[DATE]),1) = 7 ,TIME(4,0,0), TIME(8,0,0))

 

 

to right formt the total extra hour I use 

 

Total Extra hour = SUMX(VALUES('hh tsv'[DATE]),[_02 Horas extra])

 

 

4º I have to divide the extra hour per total hour, to analyse em porcentagem how many extra hours I did in relation total hh and plot it in a chart and plot a char the total hour per day . But How I'm use measure until here I dont know how to do it.

 

2 REPLIES 2
Fowmy
Super User
Super User

@Estyfodense 

Check the attached file for the measures and the added columns. It is converted to minutes for the Extra Hours. 
You have started another thread on the same topic please close both by accepting a reply if it works for you.

https://1drv.ms/u/s!AmoScH5srsIYgYUgfpeX9ZLdUic9mQ?e=83Ye7C
Fowmy_0-1598216368061.png

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

A oppen a another to explain better, so The format of the time is wrong.
Its almost like that.  Estoy aprendiendo a usar la plataforma

grafico_faixa_de_horarios.png
https://onedrive.live.com/?authkey=%21ABrRLkG1lSx7CCA&cid=59DCB3D8412CF0F3&id=59DCB3D8412CF0F3%21230...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.