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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
FatBlackCat30
Microsoft Employee
Microsoft Employee

Card Visual to dcount based off two conditions

Hi all,

 

I have two card visuals showing the distinct count of ID's based off a scenario (No Category Selected & No cusomter Name).  A single ID can have both scenarios, when I filter to scenario = "No Category Selected" the No Customer Name card visual blanks out & vice vera. 

 

Is there a way I can I can capture the distinct count of scenario = No Customer Name when I filter to Scenario = No Category Selected?

 

heres an example file showing the issue:

 

Pbi File Example 

 

Thank you!

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

Hi @FatBlackCat30 ,

 

Create 2 measures as below:

No Category Selected = CALCULATE(DISTINCTCOUNT('Example Data'[Product]),FILTER(ALL('Example Data'),'Example Data'[Scenario ]="No Category Selected"))
No Customer Name = CALCULATE(DISTINCTCOUNT('Example Data'[Product]),FILTER(ALL('Example Data'),'Example Data'[Scenario ]="No Customer Name"))

And you will see:

v-kelly-msft_0-1614159854326.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @FatBlackCat30 ,

 

Create 2 measures as below:

No Category Selected = CALCULATE(DISTINCTCOUNT('Example Data'[Product]),FILTER(ALL('Example Data'),'Example Data'[Scenario ]="No Category Selected"))
No Customer Name = CALCULATE(DISTINCTCOUNT('Example Data'[Product]),FILTER(ALL('Example Data'),'Example Data'[Scenario ]="No Customer Name"))

And you will see:

v-kelly-msft_0-1614159854326.png

 

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

Ashish_Mathur
Super User
Super User

Hi,

I cannot understand your question at all.  Please show the exact expected result when you make different slicer selections.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

I have  Version: 2.88.802.0 64-bit (December, 2020) and cannot open your PBIX file. Looking inside it says "Version":"2.90.542.0".  Oopsie much?

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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