Forum Discussion

FatBlackCat30's avatar
FatBlackCat30
Microsoft Employee
5 years ago
Solved

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!

  • 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:

     

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

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

     

3 Replies

  • v-kelly-msft's avatar
    v-kelly-msft
    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:

     

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

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

     

  • 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?

  • Hi,

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