cancel
Showing results for
Did you mean:
Helper I

## plot Chart time

I've try plot a chart with this table but there is something wrong, I have to plot a chart with Extra Hour, and another with divide an Extra hour per Total HH and plot a chart.

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

To get the right total of columns I use

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

to get  extra hour

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

Total Extra hour = SUMX(VALUES('hh tsv'[DATE]),[_02 Horas extra])``````
1 ACCEPTED SOLUTION
Super User

@Estyfodense

If you are trying to plot the extra hours on a graph, you need to have it in one measurement unit, so convert the extra time to minutes by adding the following column in your table.

``````Horas extra =
VAR T = [Total HH] - IF( WEEKDAY(MAX('hh tsv'[DATE]),1) = 7 ,TIME(4,0,0), TIME(8,0,0))
RETURN
T * (24*60)``````

This is your chart with Extra Time in Minutes:

________________________

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 🙂

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

Format your [Total Extra Hour] as hh:nn:ss as below

Then, You should be able to get the sum of the [Total Extra Hour]

Helper I

I've already done this, but my measurement is in the tooltip tab

Super User

@Estyfodense - Sorry, not following this. Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
Check out my latest book!

Helper I

I did a chart in excel that show me the total of extra hour and know I'm try do this at PBI.
I used measure to calculate the total of extra hour per day and now I'd like plot a char with the value .

Super User

@Estyfodense

If you are trying to plot the extra hours on a graph, you need to have it in one measurement unit, so convert the extra time to minutes by adding the following column in your table.

``````Horas extra =
VAR T = [Total HH] - IF( WEEKDAY(MAX('hh tsv'[DATE]),1) = 7 ,TIME(4,0,0), TIME(8,0,0))
RETURN
T * (24*60)``````

This is your chart with Extra Time in Minutes:

________________________

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 🙂

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

Announcements