Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi guys,
I have the below table where I have columns going across for each day (hours worked).
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjBU0lEyAGIjIDaDsk2UYnWilQwNoFxTuDBcyghJGIFjYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [EmployeeID = _t, #"Monday Hours" = _t, #"Tuesday Hours" = _t, #"Wednesday Hours" = _t, #"Thursday Hours" = _t, #"Friday Hours" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"EmployeeID", Int64.Type}, {"Monday Hours", Int64.Type}, {"Tuesday Hours", Int64.Type}, {"Wednesday Hours", Int64.Type}, {"Thursday Hours", Int64.Type}, {"Friday Hours", Int64.Type}})
in
#"Changed Type"
I would like to change this table to the below. Employee ID is repeated going down based on each day and the no. of hours. Can you please advise?
EmployeeID | Day | Hours |
1 | Monday Hours | 0 |
1 | Tuesday Hours | 2 |
1 | Wednesday Hours | 6 |
1 | Thursday Hours | 0 |
1 | Friday Hours | 4 |
10 | Monday Hours | 0 |
10 | Tuesday Hours | 5 |
10 | Wednesday Hours | 0 |
10 | Thursday Hours | 4 |
10 | Friday Hours | 4 |
12 | Monday Hours | 5 |
12 | Tuesday Hours | 0 |
12 | Wednesday Hours | 0 |
12 | Thursday Hours | 0 |
12 | Friday Hours | 0 |
Thanks
Solved! Go to Solution.
Hi @threw001
In Power Query:
Select the EmployeeID column, right-click and Unpivot Other Columns.
Hi @threw001
In Power Query:
Select the EmployeeID column, right-click and Unpivot Other Columns.
could you pls provide some sample data?
Proud to be a Super User!
Hi @ryan_mayu
Sample data below for Power Query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjBU0lEyAGIjIDaDsk2UYnWilQwNoFxTuDBcyghJGIFjYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [EmployeeID = _t, #"Monday Hours" = _t, #"Tuesday Hours" = _t, #"Wednesday Hours" = _t, #"Thursday Hours" = _t, #"Friday Hours" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"EmployeeID", Int64.Type}, {"Monday Hours", Int64.Type}, {"Tuesday Hours", Int64.Type}, {"Wednesday Hours", Int64.Type}, {"Thursday Hours", Int64.Type}, {"Friday Hours", Int64.Type}})
in
#"Changed Type"
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |