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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Anonymous
Not applicable

please teach how to deal columns..

Hello, I am someone who has been working with PowerBI since recently.
The database I have has a column for each hour from 0:00 to 24:00, and each one contains the hours worked by the minute.(The minimum is 0 and the maximum is 60.)
For example, when I worked from 8:30 to 12:00, the 8:00 line got 30 and the 9-11:00 line got 60.
Using these columns and others, I would like to compare the total number of hours worked for each hour on a vertical bar graph.
I want them to be independent with one vertical bar per hour, not a stack.
But when I tried it, it ended up piling up or assembling.
Incidentally, these hourly columns are the ones I added on PowerBI based on the table.
Can you give me some suggestions on how to do this?

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to the data you provide and your description, you can get the result you expect by doing the following steps.

Click transform data and do the following in turn.

1.Unpivot other columns

TEST_0326_1.PNG

2.Change the type.

First change to "date / time" type, then add a new step to change to "time" type

test_0326_2.PNG

test_0326_3.PNG

 

test_0326_4.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to the data you provide and your description, you can get the result you expect by doing the following steps.

Click transform data and do the following in turn.

1.Unpivot other columns

TEST_0326_1.PNG

2.Change the type.

First change to "date / time" type, then add a new step to change to "time" type

test_0326_2.PNG

test_0326_3.PNG

 

test_0326_4.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks for the reply.
I'll share an image of the table I have now and the graph I want to create.
The first picture is a column of hours of work based on the start and end times of the work.
In the second picture, I'm not sure how to do it, although I'm wondering if it would work if I put the sum of each time in this blank column.
And the third picture is the image of the graph you want to make.
I would like to know a good way to do it.....

 

image1:

https://www.dropbox.com/s/sp83751dbwd5r8p/image01.PNG?dl=0

 

image2:

https://www.dropbox.com/s/dsimqy9croej1m1/image02.PNG?dl=0

 

image3:

https://www.dropbox.com/s/pdb3pmn1622krol/image03.PNG?dl=0

mussaenda
Super User
Super User

Hi @Anonymous ,

 

Can you provide a sample data and your preferred output?

Thank you

Greg_Deckler
Super User
Super User

I would strongly suggest unpivoting your hour columns in Power Query. If, for some reason, that is impossible, you could do something like creating a completely disconnected table with your hours in it and then write a measure like this.

 

Measure = 
  SWITCH('HoursTableIJustCreated'[Hour],
    8,SUM('Table'[8:00]),
    9,SUM('Table'[9:00]),
    10,SUM('Table'[10:00]),
    11,SUM('Table'[11:00]),
    <you get the idea>
  )

But, again, unpivot.



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

I did not get it completely. But it seems like you need hours split. Can you share sample data and output?

Also, refer to this file

https://www.dropbox.com/s/yuv64v0cneseghx/value%20Split%20between%20months%20start%20end%20date.pbix...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors