cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PedroYondr
Helper II
Helper II

HOW CAN I COUNT ALL THE "CELLS" IN A TABLE?

Hi all,

can you help me with this issu? 

i want to measure the totla number of "cells" in a table.

PedroYondr_0-1631716180441.png

 

this example shows what i want. i have  table with three columns and three rows. the total cells with info es 9.

is thare any formula to do it?

 

Thanks

1 ACCEPTED SOLUTION
yingyinr
Community Support
Community Support

Hi @PedroYondr ,

You can add a custom column as below in Power Query Editor to get it, please find the details in the attachment.

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTIEYkelWJ1opSQgywiIncC8ZCDLGIidlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"TITLE 1" = _t, #"TITLE 2" = _t, #"TITLE 3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"TITLE 1", type text}, {"TITLE 2", Int64.Type}, {"TITLE 3", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Count of cells", each Table.RowCount(Source) *Table.ColumnCount(Source))
in
#"Added Custom"

yingyinr_1-1632127542602.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
yingyinr
Community Support
Community Support

Hi @PedroYondr ,

You can add a custom column as below in Power Query Editor to get it, please find the details in the attachment.

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTIEYkelWJ1opSQgywiIncC8ZCDLGIidlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"TITLE 1" = _t, #"TITLE 2" = _t, #"TITLE 3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"TITLE 1", type text}, {"TITLE 2", Int64.Type}, {"TITLE 3", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Count of cells", each Table.RowCount(Source) *Table.ColumnCount(Source))
in
#"Added Custom"

yingyinr_1-1632127542602.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

@PedroYondr Perhaps:

Number of Cells = 
  VAR __NumColumns = 3
RETURN
  COUNTROWS('Table')*__NumColumns

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.