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
Quakker
Helper II
Helper II

Count Values not working as desired

Hi,

currently i am struggeling within Power BI Desktop.

My goal is...

I want to create a measure which counts the amount of names within my dataset and depending on the amount it should give an output.

For example.

If there are 3 or more distinct names within my table (after filtering using slicer). The Measure should return the Amount of names.

If there are 2 or less distinct names within my table (after filtering using slicer). The Measure should return "blank()".

The screenshot shows, that i am using a slicer. I receive an amount of remaining rows of 4.

Nevertheless the pie chart dont order the 4 values to the gender they have. I assume that the amount of names measure will be calculated on a row level? Any1 an idea how to fix it that the pie chart orders the 4 rows to their gender?

Here the Measure dax:

Quakker_1-1666174126513.png

And Dax Dimension:

Quakker_2-1666174446101.png

 

 

 

Quakker_0-1666173982420.png

NameCitySexCountry
MeierBerlinmGermany
MüllerBerlinmGermany
AusterjostBerlinmGermany
GrafHamburgmGermany
BrandMadridmSpanien
StrothoffMadridmSpanien
KramerBarcelonawSpanien
ModestePortowPortugal
FedererLiverpoolwEngland

 

Thanks already for your help.

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @Quakker ,

 

vyinliwmsft_0-1666230131098.png

Is that what you expect?

 

If so, you can do this:

vyinliwmsft_1-1666230194747.png

 

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

View solution in original post

1 REPLY 1
v-yinliw-msft
Community Support
Community Support

Hi @Quakker ,

 

vyinliwmsft_0-1666230131098.png

Is that what you expect?

 

If so, you can do this:

vyinliwmsft_1-1666230194747.png

 

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

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.