cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
beardsleys Frequent Visitor
Frequent Visitor

Count feature changes data on Table

I created at table from the data imported and whenever I chose the count feature it replaces the actual data with a "1" in order to provide a total count.  Is there a way I can have the column maintain the data while still providing a total Count?

 

Example: 

I have a column of Employee names, and I want to know how many employees there are total.  If I turn on the Count feature, it replaces each name with a "1" and gives the total number at the bottom, but I still want to see the Employee Name for each record. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Count feature changes data on Table

hi, @beardsleys

This relates to the row context and filter context in calculation

You could use COUNTA Function to create a measure, then drag Employee Name and this measure into visual together

For example:

4.JPGbasic data

Measure = CALCULATE(COUNTA(Table1[Name]))

Result:

5.JPG

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Nick_M New Contributor
New Contributor

Re: Count feature changes data on Table

in Power Query, you can go to Add Column -->Index Column-->From 1

 

Or you can create a measure :

Count = 
COUNTROWS( Table )
Community Support Team
Community Support Team

Re: Count feature changes data on Table

hi, @beardsleys

This relates to the row context and filter context in calculation

You could use COUNTA Function to create a measure, then drag Employee Name and this measure into visual together

For example:

4.JPGbasic data

Measure = CALCULATE(COUNTA(Table1[Name]))

Result:

5.JPG

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.