cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Estyfodense
Helper I
Helper I

plot Chart time

02.jpg

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

@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)

 

Fowmy_0-1598214330402.png

This is your chart with Extra Time in Minutes:

Fowmy_1-1598214360719.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

View solution in original post

5 REPLIES 5
pranit828
Super User
Super User

Hi @Estyfodense 

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

 

pranit828_0-1598205779682.png

 

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

pranit828_0-1598205662904.png

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

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

Greg_Deckler
Super User
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

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

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.


@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

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 .
Sem título.png

@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)

 

Fowmy_0-1598214330402.png

This is your chart with Extra Time in Minutes:

Fowmy_1-1598214360719.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

View solution in original post

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors