Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 like
Regards ,
Pooja
Any suggetion ,
Solved! Go to Solution.
@Anonymous
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] ) )
Hello,
I usually create a column called "nrows" with all values 1. Then you can put that variable in any visual and indicates the number of rows. It's simpler than to use CALCULATE when you have many columns.
You can generate it in query (new column [nrwos]=1) or as a calcualted column [nrows]=1.
I hope it helps
Hi @Anonymous
As Greg_Deckler said, the measure can calculate the total rows of the table depite some column you used aggregate function like sum.
However, the total value can't show at the top of the table.
Best Regards
Maggie
@Anonymous
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] ) )
You need to define a measure that count the number of distintct elements of the elements that you are using in the visual table. Try the following, for a visual table that hast N columns in it would be
COUNTROWS(GROUPBY('table'[columnA],[columnB],...,[columnN]))
Hello,
I want to see how many rows are in the table visual in PBI. The measure COUNTROWS(table) will give me all the rows present in the table, which I don't want. I just want to see the total rows in the visual, how can I do that?
Thanks
pthapa
You should just be able to create a measure like:
MyCount = COUNTROWS('Table') or maybe MyCount = COUNTROWS(CALCULATETABLE('Table'))
Hello Greg,
I wanted to see the total rows present in the table/matrix visual not the entire rows present in the model.
Example, I have a table visual with Customer No 1001,1002,1003 with their sales, now when you put them in the table visual, there are only 3 rows present in the visual. But if I use the dax COUNTROWS(), this will give me the count of rows for the entrie model for specific customer No, which I don't want. I want to show only 3 since I have only 3 rows in the visual.
Hope this make sense. Can you please help.
Thanks,
pthapa
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?
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?
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
Hi @Anonymous
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
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
.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |