March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
need help
i have a table = Table1
ColumnA | ColumnB | ColumnC
Complete | Complete | Complete
In Progress | Complete | Complete |
In Progress | Complete | In Progress |
no i need to make another table = Table2,
Column1 | countCol (count the total of complete per column from table 1)
ColumnA | 1
ColumnB | 3
ColumnC | 2
Solved! Go to Solution.
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Query1 = Table1,
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Query1, {}, "Column1", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] = "Complete")),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Column1"}, {{"countCol", each Table.RowCount(_), Int64.Type}})
in
#"Grouped Rows"
Another way
let
Query1 = Table1,
#"Demoted Headers" = Table.DemoteHeaders(Query1),
#"Transposed Table" = Table.Transpose(#"Demoted Headers"),
#"Added Custom" = Table.AddColumn(#"Transposed Table", "countCol", each List.Count(List.Select(Record.ToList(_),each _ = "Complete"))),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Column2", "Column3", "Column4"})
in
#"Removed Columns"
See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test
let
Query1 = Table1,
#"Unpivoted Columns" = Table.UnpivotOtherColumns(Query1, {}, "Column1", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] = "Complete")),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Column1"}, {{"countCol", each Table.RowCount(_), Int64.Type}})
in
#"Grouped Rows"
Another way
let
Query1 = Table1,
#"Demoted Headers" = Table.DemoteHeaders(Query1),
#"Transposed Table" = Table.Transpose(#"Demoted Headers"),
#"Added Custom" = Table.AddColumn(#"Transposed Table", "countCol", each List.Count(List.Select(Record.ToList(_),each _ = "Complete"))),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Column2", "Column3", "Column4"})
in
#"Removed Columns"
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
13 | |
9 |
User | Count |
---|---|
36 | |
31 | |
20 | |
19 | |
17 |