Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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"
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
7 | |
6 | |
5 |