Forum Discussion

medwards's avatar
medwards
Frequent Visitor
3 years ago

Help with ISBLANK function

Hope someone can help with this ISBLANK function:

 

# Tables with no person assigned = CALCULATE(DISTINCTCOUNT(responsibility[table_id]),(responsibility[role_id]="Engineer" && ISBLANK(responsibility[user_id])))

 

It is currently not returning a number, so I must have done something wrong here.

 

Appreciate any help!

4 Replies

  • medwards , seem fine, need data to test

     

    Try like this

     


    # Tables with no person assigned = CALCULATE(DISTINCTCOUNT(responsibility[table_id]),Filter(responsibility, responsibility[role_id]="Engineer" && ISBLANK(responsibility[user_id])))

     

    If this does not help
    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, medwards 

     

    You can try the following methods.

    Sample data:

    Measure:

    # Tables with no person assigned = 
    CALCULATE ( DISTINCTCOUNT ( responsibility[table_id] ),
            FILTER ( ALL ( responsibility ),
                responsibility[role_id] = "Engineer"
                    && ISBLANK ( responsibility[user_id] )
            )
        )

    Or

    Measure = 
    CALCULATE ( DISTINCTCOUNT ( responsibility[table_id] ),
            FILTER ( ALL ( responsibility ),
                responsibility[role_id] = "Engineer"
                    &&  responsibility[user_id] = BLANK()
            )
        )

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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

     

  • medwards's avatar
    medwards
    Frequent Visitor

    Thanks for the various solutions. For some reason, the formulas are not capturing the blank values. I'm trying different fields besides user_id like user_lastname but still not recognizing blanks. Very strange

    • v-zhangti's avatar
      v-zhangti
      Community Support

      Hi, medwards 

       

      Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

       

      Best Regards,

      Community Support Team _Charlotte

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