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
residentx
Helper IV
Helper IV

RE: Distinct Count Question

I have a list of customers. Also, I created a column inside of this list with letters (A-Z) to see how many companies are in which letter. Unfortunately, I used the distinct count but I cannot get the info I need. Any comments?

 

I want the results to look like this:

 

A - 100

B  - 25

C - 55

 

but I got 26 distinct count and aggregate count was 560.

8 REPLIES 8
Greg_Deckler
Super User
Super User

If you have something like:

 

Customer,Letter

 

Create a measure like:

 

NumberOfCustomers = COUNT([Customer])

Create a table visualization and put Letter and NumberOfCustomers in it.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

My Colums are these:

 

Name, Letter

 

I created the measure but the table visualization I couldn't get to work right. I use the card and filtered it for the letter I need and it showed the number I wanted. If I need 26, then I guess I need to create 26 cards and resize them. The measure worked nicely though if only I could find a way to make it twist easier. I would like to be able to click letters and have it show numbers.

 

I need to watch more videos 🙂

Hi residentx,

 

Smoupre’s point seems well, I’d like to share other way to achieve your requirement:

 

  1. Add a tables visual.

 Capture.PNG

 

Capture2.PNG

  1. Right-Click on name column, and choose summarize option count:

 Capture3.PNG

 

Capture4.PNG

 

In addition, if you want to display the specify item(e.g. a, b, c), you could add a slicer to filter the data.

 Capture5.PNG

Capture6.PNG

Result:

 Capture7.PNG

 

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Xiaoxin,

 

What version of powerBI are you using? I don't have the slicer in version, Version: 2.37.4464.602 64-bit (July 2016)

The slicer visual has always been there. If you are using the card visualization, you could have a single measure but just filter each one by the letter that you want. I'm not sure what could possibly have gone wrong with a table visualization.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I can see the visuals but they are two separate ones. Can we "chain" visuals in Powerbi now?

Yes, you have always been able to chain visuals together in Power BI.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I think I'm tired today. Let me look at this when I'm fresh. The table allowed me to do some things but not everything I wanted.

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