This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
hi sir,
yesterday you have replied to one of my query yesterday . But that was not enough for me .
Please help to solve it .
I will explain again.
| employee-project | hours casted |
| ashik | 48 |
| pbi | 40 |
| java | 8 |
| rahul | 48 |
| java | 32 |
| php | 32 |
| personal leave | 8 |
| holiday | 8 |
| amit | 40 |
| sql | 32 |
| holiday | 8 |
our one table ;ike this with diffrent employee name and their project wise time allocation and holiday or leave allocation.
we have another table
| employee | total casted hours | empid |
| ashik | 48 | ina101 |
| rahul | 48 | ina504 |
| amit | 40 |
|
result i want is . Please help me sir.im new to this department
| employee | holiday hours | personal leave hours |
| ashik | 8 | 0 |
| rahul | 8 | 8 |
| amit | 8 | 0 |
Solved! Go to Solution.
Hi @ashikts ,
some fill-down and pivot-magic should do the trick:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSizOyMxW0lEysVCK1YlWKkjKBHEMwJysxLJEIA8iU5SYUZqDUAiVMzaCaMsoQOKkFhXn5yXmKOSkJpalwg3IyM/JTEmshPMTczNLEHYVF+YgTEBRGgsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"employee-project" = _t, #"hours casted" = _t]),
EmployessTable = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSizOyMxW0lEysQASmXmJhgaGSrE60UpFiRmlOUjipgYmYPHE3MwSkLABkFCKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"employee " = _t, #"total casted hours" = _t, empid = _t]),
#"Merged Queries" = Table.NestedJoin(Source, {"employee-project"}, EmployessTable, {"employee "}, "EmployessTable", JoinKind.LeftOuter),
#"Expanded EmployessTable" = Table.ExpandTableColumn(#"Merged Queries", "EmployessTable", {"employee "}, {"employee "}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded EmployessTable",{{"hours casted", type number}}),
#"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "employee ", "employee - Copy"),
#"Filled Down" = Table.FillDown(#"Duplicated Column",{"employee "}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([#"employee - Copy"] = null)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"employee - Copy"}),
#"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[#"employee-project"]), "employee-project", "hours casted", List.Sum)
in
#"Pivoted Column"
Please also check the attached file.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @ashikts ,
some fill-down and pivot-magic should do the trick:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSizOyMxW0lEysVCK1YlWKkjKBHEMwJysxLJEIA8iU5SYUZqDUAiVMzaCaMsoQOKkFhXn5yXmKOSkJpalwg3IyM/JTEmshPMTczNLEHYVF+YgTEBRGgsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"employee-project" = _t, #"hours casted" = _t]),
EmployessTable = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSizOyMxW0lEysQASmXmJhgaGSrE60UpFiRmlOUjipgYmYPHE3MwSkLABkFCKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"employee " = _t, #"total casted hours" = _t, empid = _t]),
#"Merged Queries" = Table.NestedJoin(Source, {"employee-project"}, EmployessTable, {"employee "}, "EmployessTable", JoinKind.LeftOuter),
#"Expanded EmployessTable" = Table.ExpandTableColumn(#"Merged Queries", "EmployessTable", {"employee "}, {"employee "}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded EmployessTable",{{"hours casted", type number}}),
#"Duplicated Column" = Table.DuplicateColumn(#"Changed Type", "employee ", "employee - Copy"),
#"Filled Down" = Table.FillDown(#"Duplicated Column",{"employee "}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([#"employee - Copy"] = null)),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"employee - Copy"}),
#"Pivoted Column" = Table.Pivot(#"Removed Columns", List.Distinct(#"Removed Columns"[#"employee-project"]), "employee-project", "hours casted", List.Sum)
in
#"Pivoted Column"
Please also check the attached file.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 22 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 45 | |
| 20 | |
| 18 | |
| 18 |