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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Group data by ID in PowerBI Service

I have a dataset where I want to group data by ID so that the data only count values for each ID once. I am not able to download nor open the data in the Desktop version, so need a way to cluster the data in Service. 

 

More details:

My dataset contains obervations on initiatives by different organisations, where each initiative expands over several rows - one for each category the initiative falls under. In a bar chart, I want to present how many initiatves are a result of a partnerships, and have added the value 1 for those initiatives that are partnerships. However, if an initiative expands over 5 categories, PowerBI will count this as 5 partnerships and not 1. How can I group the data by ID so that each inititaive is only counted once - without including ID in the chart as I want the oservations to be sorted by organization and not by ID? 

 

Thank a lot in advance!!

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

You could then use the DISTINCTCOUNT function to get it to only count the ID once?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

5 REPLIES 5
GilbertQ
Super User
Super User

Hi @Anonymous 

 

It sounds like you need to create a measure, which as it stands today you cannot create in the Power BI Service.

 

You should be able to use Power BI desktop to link to the same dataset and then create the measure?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Thank you for the answer, @GilbertQ 

 

I should be able to connect the dataset to through desktop. Also, the dataset is not that large so it can also be edited directly in the connected excel file.

 

I already have an ID that is a index number/measure for each initiative+ the name that is a sting and can also be used as ID. Will the index number help for the next step? 

Hi @Anonymous 

 

You could then use the DISTINCTCOUNT function to get it to only count the ID once?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Thank you, @GilbertQ! I solved it by using ID number instead of dummy to indicate the partnerships and then DISTINCTCOUNT. Appreciate your help!

That is great news, thanks for letting us know!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors