Forum Discussion

herefortryouts's avatar
herefortryouts
Frequent Visitor
5 years ago
Solved

Card to show CountIf

Hi team,   My excel column has a list of Yes and No and I want the Card visual in power BI to count the number of "Yes" and another card to count the number of "No". At the moment the card is just ...
  • HotChilli's avatar
    5 years ago

    drag the column on to a card.

    Change the summarization to COUNT -> from the dropdown in the field well.

    That will give you a count of all values.

    --------------------

    open the Filter pane.  Drag the column in to the filter pane.  Select basic filtering.  You should see the values 'yes', 'no' beneath that.  Choose one.

    ---------------------

    When you have that working, do it all again for the other choice (yes or no).

     

    godd luck

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  herefortryouts ,

    According to your description, I create this data:

    Here are the steps you can follow:

    1. Create measure.

    Yes =
    var _count=CALCULATE(COUNT('Table'[yes_no]),FILTER('Table','Table'[yes_no]="yes"))
    return
    "Countif(column,yes)"&"-"&_count
    No =
    var _count=CALCULATE(COUNT('Table'[yes_no]),FILTER('Table','Table'[yes_no]="no"))
    return
    "Countif(column,no)"&"-"&_count

    2. Place the measure in the card.

    3. Result.

    You can downloaded PBIX file from here.

     

    Best Regards,

    Liu Yang

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