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.
viveksasi94
Helper I
7 years agoHello everyone,
I'm new to power BI, Please help me out with this. My expected input and output tables are as given below.
INPUT
| Number | Column2 |
| 1 | a |
| 2 | a |
| 1 | b |
| 4 | a |
| 2 | b |
| 4 | b |
| 4 | a |
| 1 | b |
OUTPUT
| Number | a | b |
| 1 | 1 | 2 |
| 2 | 1 | 1 |
| 4 | 2 | 1 |
Thanks in advance,
Vivek
Anonymous
6 years agoNot applicable
Just found this to be unanswered;
1. create a duplicate column of column2
2. select both the column2 and duplicate column2 and click on pivot table option available.
this will change the dataset into required format;