Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago

COUNT BLANK BUT FIELDS EACH ROW

Hello

Thank you for your support with the following query: count how many columns are empty at row level.

As you can see in the table there are several columns and some are empty, what I need is to know how many blank fields there are but horizontally that is, for each row

6 Replies

  • ExcelMonke's avatar
    ExcelMonke
    Impactful Individual

    You may try:

    Empty Columns =
    
    VAR USUARIO_CREA = IF(ISBLANK(Table[USUARIO_CREA]),1,0)
    VAR USUARIO_LIBERACION = IF(ISBLANK(Table[USUARIO_LIBERACION]),1,0)
    VAR N = IF(ISBLANK(Table[Column N]),1,0)
    Return
    SUM(USAURIO_CREA, USUARIO_LIBERACION, ... n)

    Repeat for each column in N

    If ISBLANK is returning you an error, try IF(Table[Column] = 0,1,0). Alternatively IF(Table[Column]="",1,0). Depending on the actual "value" of an "empty" column.

  • Hello, from what I see in the formula, it is for it to count by columns, that is, from arrba downwards, what I need is for it to count from left to right the fields of a row

    Let's imagine that I have the table "datos_personales" and this table only has one row of data and this table has 20 columns (name, age, gender, etc), some fields full and some empty, how could I know how many fields out of the 20 columns are empty.

    • ExcelMonke's avatar
      ExcelMonke
      Impactful Individual

      Yes, so if you add this to a table (or matrix), with the rows populated by your rows in your master table, it will calculate it by row

  • One last question, should I apply the formula you provided as a column or as a measure?

  • Hi,

    It is easier to solve this in the Query Editor.  If you want to receive further help, then share some data to work with and show the expected result.