Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Count row with blank data

Hi everyone !   I have a simple request but i tried different ways but I didn't solve it. I would like to count how many times I have a blank rows, here is the field " Groupe mandataire retraité" ...
  • 123abc's avatar
    2 years ago

    To count the number of blank rows based on the "Groupe mandataire retraité" column in Power BI using DAX, you can use the following approach:

    1. Create a calculated column that checks if the "Groupe mandataire retraité" column is blank for each row.
    2. Then, create a measure to count the number of rows where the calculated column is true.

    Here are the steps to implement this:

    1. Create a calculated column:

      • Go to the table where your data is located.
      • Click on "Modeling" in the menu at the top.
      • Click on "New Column" in the toolbar.
      • Enter the following formula for the new column:

    BlankRowCheck = ISBLANK('YourTableName'[Groupe mandataire retraité])

     

    1. Replace 'YourTableName' with the name of your table.

    2. Create a measure to count blank rows:

      • Click on "New Measure" in the toolbar.
      • Enter the following formula for the measure:

    BlankRowCount = COUNTROWS(FILTER('YourTableName', 'YourTableName'[BlankRowCheck]))

     

    1. Replace 'YourTableName' with the name of your table.

    After creating the measure, you can add it to a card visual to display the number of blank rows based on the "Groupe mandataire retraité" column.

    This approach should give you the count of blank rows as expected in your Excel example. Make sure to replace 'YourTableName' with the actual name of your table in Power BI.

     

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

     

    In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.