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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Community Champion
Community Champion

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!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.