cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

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
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

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
v-yiruan-msft
Community Support
Community Support

Hi @Anonymous ,

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

@Anonymous 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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors