Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filled Cell Count Help Required

Hi there.

 

I am new to PowerBi and stuck on a DAX formula.

 

Basically in my table,  I have 3 columns that refer to 3 different answers from an individual in a survey. I want to create a 4th column to tell me how many of the other 3 columns they put in an answer for i.e. if they answer 2 out of the 3 questions, the 4th column will give me a 2 and so on.  This is based on one individual row. See example below with the column in bold is what I need.

 

NameStartEnd3monthResponseRate
Joe1453
Mary40 2

 

I have got it to work using :

M1Responses3month = INT(Table1[ M1Reg]<>BLANK())+INT(Table1[ M1End]<>BLANK())+INT(Table1[ M13Month]<>BLANK()), however it doesnt count the 0 as a filled cell so the second row on the example table above with 0 as one of the reponses. it returned 1 when it should be 2 as it is still a filled cell. How do I get around this?
  • Anonymous , a new column in dax

    if(isblank([column1]),0,1) + if(isblank([column2]),0,1)+if(isblank([column3]),0,1)

2 Replies

  • Anonymous , a new column in dax

    if(isblank([column1]),0,1) + if(isblank([column2]),0,1)+if(isblank([column3]),0,1)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you sooooo much!!!:D