Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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?
Solved! Go to Solution.
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
2.Change the type.
First change to "date / time" type, then add a new step to change to "time" type
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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
2.Change the type.
First change to "date / time" type, then add a new step to change to "time" type
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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:
Hi @Anonymous ,
Can you provide a sample data and your preferred output?
Thank you
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.
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
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
100 | |
65 | |
44 | |
36 | |
36 |