Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don'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.

Reply
Carliniiiii
Frequent Visitor

Count by category

Hello Power BI community, 

 

I have following data set: 

ProjectLocation
Project1A
Project1A
Project1B
Project2B
Project2C

 

I would like to count each different location once per project. So I want to create a new table with following informations for further analysis: 

 

LocationFrequency
A1
B2
C1

 

Many thanks for your help or ideas. 

2 ACCEPTED SOLUTIONS
bhanu_gautam
Super User
Super User

@Carliniiiii , You can use Summarize function for this and create a new table by going into modelling section

 

NewTable =
SUMMARIZE(
'YourTableName',
'YourTableName'[Location],
"Frequency", COUNTROWS(SUMMARIZE('YourTableName', 'YourTableName'[Project], 'YourTableName'[Location]))
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

@Carliniiiii , Create another table using

 

GroupedData =
SUMMARIZE(
YourTableName,
YourTableName[Location],
YourTableName[Response],
"Frequency", COUNT(YourTableName[Response])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

3 REPLIES 3
Carliniiiii
Frequent Visitor

@bhanu_gautam , I have another question in a similar format. 

 

I have following table: 

 

Location QuarterResponse
AQ1Yes
AQ2No
AQ3No
AQ4Yes
BQ1No
BQ2Yes
BQ3Yes
BQ4Yes

 

And I would like it to be grouped by both location as well as yes/no answers. I have limited the example to one year only but it should work over multiple years.

 

LocationsResponseFrequency
AYes2
ANo2
BYes3
BNo1

 

Many thanks 

@Carliniiiii , Create another table using

 

GroupedData =
SUMMARIZE(
YourTableName,
YourTableName[Location],
YourTableName[Response],
"Frequency", COUNT(YourTableName[Response])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






bhanu_gautam
Super User
Super User

@Carliniiiii , You can use Summarize function for this and create a new table by going into modelling section

 

NewTable =
SUMMARIZE(
'YourTableName',
'YourTableName'[Location],
"Frequency", COUNTROWS(SUMMARIZE('YourTableName', 'YourTableName'[Project], 'YourTableName'[Location]))
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.