Forum Discussion

RodgerB's avatar
RodgerB
Frequent Visitor
6 years ago
Solved

Filter out Rows where a table column result is blank

I am in Excel using Powerpivot, and I am trying to create a measure that shows a distinct count; however, discards/filters rows where a table[column] returns a blank.

 

=if(ISBLANK([Company A Measure]) && ISBLANK(Company B Measure]),BLANK(),DISTINCTCOUNT('Data Files'[Field]))

 

Company A Measure, Company B Measure, and the above are added to the Pivot.  

Pivot Example

 

I do not want to see the rows where the Type is blank.  I can't figure this out.  I appreciate any help.

I do not want the rows where Spice Type shows blanks

  • Hi RodgerB , 

    I am not sure your detailed requirement, did you want to show type cells which have values in it? If so, you could try to click on type to filter data which is not blank to see whether it work or not.

    Best Regards,
    Zoe Zhi

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

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Can you explain further?  Your measure is true (and returns blank) only if both CompanyA and CompanyB measures are blank, which based on your visual, they aren't (so the DC is returned).

     

    And is Type a measure or column?

     

    Regards,

    Pat

     

  • dax's avatar
    dax
    Community Support

    Hi RodgerB , 

    I am not sure your detailed requirement, did you want to show type cells which have values in it? If so, you could try to click on type to filter data which is not blank to see whether it work or not.

    Best Regards,
    Zoe Zhi

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

    • RodgerB's avatar
      RodgerB
      Frequent Visitor

      Good morning, Zoe,

       

      Thank you for your suggestion.  I did figure this out at about 8 last night.  I created a count measure, checking the two Company measures, that results in either a 1 or a 0.  I then filtered from the Type Label field so filter the Count Value field to show just the 1's.

       

      It worked.  I'll mark this as a solution.  Thanks again!