cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

COUNT all Entries in Columns Dynamically in whole Table

Hey there,

 

I want to count the total entries for all rows and columns within a table. This isn't so hard, however, the table's number of columns will change in the future, and for maintenance purposes I want this formula to be dynamically adapting to the number of columns.

 

TableA right now, which should return 10 occurences.

 

TableA
A,B,C,D
o, , ,o
o,o,o,o
o,o,o,  
 , ,o,

 

 

And the TableA expanded in the future should return 13 occurences with the same formula.

 

TableA (2019+)
A,B,C,D,E
o, , ,o,o
o,o,o,o,o
o,o,o, , 
 , ,o, ,o

 Any ideas on this?

 

 Kind regards,

Igor

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: COUNT all Entries in Columns Dynamically in whole Table

Hi @Anonymous

Assume entries in your columns is "o" in text, 

Please have a look at my test

For Table A (has columns: A,B,C,D)

3.png

1.Go to Home->Edit Queries, select all columns in this table, 

2.Then select "Transform->Unpivot columns"

2.png

3.colse &&apply

4.create a calculated column

count = COUNT(Table1[Value])

5. after add a column"E" in your original data source, cilck "Refresh" button, then the [count] column would count the occurence for all five columns. 

4.png

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: COUNT all Entries in Columns Dynamically in whole Table

Hi @Anonymous

Assume entries in your columns is "o" in text, 

Please have a look at my test

For Table A (has columns: A,B,C,D)

3.png

1.Go to Home->Edit Queries, select all columns in this table, 

2.Then select "Transform->Unpivot columns"

2.png

3.colse &&apply

4.create a calculated column

count = COUNT(Table1[Value])

5. after add a column"E" in your original data source, cilck "Refresh" button, then the [count] column would count the occurence for all five columns. 

4.png

 

Best Regards

Maggie

View solution in original post

Anonymous
Not applicable

Re: COUNT all Entries in Columns Dynamically in whole Table

Hey Maggie,

 

This works perfect! Thanks for the solution.

 

Kind regards,

Igor

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (3,096)