Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 should just be able to create a measure like:
MyCount = COUNTROWS('Table') or maybe MyCount = COUNTROWS(CALCULATETABLE('Table'))
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