Forum Discussion
swatts5883
10 years agoNew Member
summarize row counts in a new column
I am new to Power BI and I'm having trouble. I want to add a column to a table that totals the number of rows for each distinct value in another column. Thus, this input data in my table: CityNam...
- 10 years ago
Create a new column called "Count" and set it equal to 1:
Count = 1
Create a new MEASURE called "Total" and set it equal to:
Total = COUNT([Count])
On report canvas, create a table visualization and add CityName and Total to it.
Anonymous
10 years agoNot applicable
Hi swatts5883,
to solve your problem step by step, you have to:
1) Select the column
2) Adjust the table using the first row like heading
3) Group By the column "CityName" , choose the new column name , and select the operation "Row count"
4) And it's done.
( . . . )
Let me know if it works.
Have a good coding
- kazlik10 years ago
Helper II
If you do not want to combine your rows you can add a measure
City total = COUNTA(Sheet1[City])