Reply
Highlighted
Member
Posts: 67
Registered: ‎12-07-2017
Accepted Solution

Table visual rows count

Hello ,
you got any solution for adding sr. no in table visual , I stuck with same probleam like i want to show total number of rows in the table visual but for some column i used aggregate function like sum ,

want to display total rows in the table visual likeppao.PNG
Regards ,

Pooja

 

Any suggetion ,


Accepted Solutions
Super User
Posts: 2,947
Registered: ‎09-27-2017

Re: Table visual rows count

@Poojad1

 

Try with this MEASURE

 

Bacially try putting all the row fields inside Summarize function

 

MEASURE =
COUNTROWS (
    SUMMARIZE (
        TableName[G/L Account],
        TableName[Customer],
        TableName[Assignment],
        TableName[Document number],
        TableName[Type],
        TableName[Posting Date],
        TableName[Year/Month],
        TableName[Year],
        TableName[BusA],
        TableName[Dos Date],
        TableName[Reference],
        TableName[PK]
    )
)

View solution in original post


All Replies
Super User
Posts: 10,775
Registered: ‎07-11-2015

Re: Table visual rows count

You should just be able to create a measure like:

 

MyCount = COUNTROWS('Table')

or maybe

MyCount = COUNTROWS(CALCULATETABLE('Table'))

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


Community Support Team
Posts: 2,773
Registered: ‎03-15-2018

Re: Table visual rows count

[ Edited ]

Hi @Poojad1

As Greg_Deckler said, the measure can calculate the total rows of the table depite some column you used aggregate function like sum.

7.png

 

However, the total value can't show at the top of the table.

 

Best Regards

Maggie

Member
Posts: 67
Registered: ‎12-07-2017

Re: Table visual rows count

Hello@Greg_Deckler

By this measure how can count Total no of rows in the visual.

Cant tack directly becouse of  tack sum of Amount balance column (group by), so some no of rows in excel sheet  get minimize the count then visual table.

want to show table visual count of rows.
Regards ,
Pooja

 

Member
Posts: 67
Registered: ‎12-07-2017

Re: Table visual rows count

Hello@Greg_Deckler

By this measure how can count Total no of rows in the visual.

Cant tack directly becouse of  tack sum of Amount balance column (group by), so some no of rows in excel sheet  get minimize the count then visual table.

want to show table visual count of rows.

Regards ,
Pooja

 

Member
Posts: 67
Registered: ‎12-07-2017

Re: Table visual rows count

@v-juanli-msft

Thanks for Reply,

Want to show on Card visual.

Pooja

Community Support Team
Posts: 2,773
Registered: ‎03-15-2018

Re: Table visual rows count

[ Edited ]

Hi @Poojad1

Yes, it can display on a card chart.

Measure = COUNTROWS(Sheet1)

If you have 10 rows in the excel, when import to Power BI, your table shows 10 rows, then the function "COUNTROWS" will count all rows of your table despite you use any aggregation in the column.

But if the number of rows in the excel is 8, then the table in Power BI shows 8 rows, you can't get more than 8 using "COUNTROWS" 

 

 

Best Regards

Maggie

Member
Posts: 67
Registered: ‎12-07-2017

Re: Table visual rows count

Hi @v-juanli-msftIf the number of rows in the excel is 8, then the table in Power BI shows 8 rows, you can't get more than 8 using "COUNTROWS" - Yes i kown , thats the issue i want to consider aggregate function and then count the rows .

If  the number of rows in excel is 8 import data in power bi Rows are 8 fine ,when we aggregate its less then 8,
hope you unstustand 

Pooja


.

 

Super User
Posts: 2,947
Registered: ‎09-27-2017

Re: Table visual rows count

@Poojad1

 

Try with this MEASURE

 

Bacially try putting all the row fields inside Summarize function

 

MEASURE =
COUNTROWS (
    SUMMARIZE (
        TableName[G/L Account],
        TableName[Customer],
        TableName[Assignment],
        TableName[Document number],
        TableName[Type],
        TableName[Posting Date],
        TableName[Year/Month],
        TableName[Year],
        TableName[BusA],
        TableName[Dos Date],
        TableName[Reference],
        TableName[PK]
    )
)
Member
Posts: 92
Registered: ‎09-04-2018

Re: Table visual rows count

if the visual involves multiple tables data....this wont work..so how do we get count of rows in visual that is sourced from multiple tables and multiple filters? should we create a another kpi visual which will show count of rows and apply same fileds and filters?