Forum Discussion

dd88's avatar
dd88
Icon for Post Patron rankPost Patron
2 years ago
Solved

In a column 2 seperate Counts for count all items and count blanks

User requirements are for a column, count total items and total blank items. The purpose is to know the blanks and then action and fill in the gaps.

 

The 2 seperate columns are
Quality Issue and Status

 

--- updated --

version 2 of screen capture that has the 2 columns with data 

 

 

How can this be achieved?

 

TIA

 

 

  • Hi,

    These measures should be dragged to a card visual

    Measure1 = counta(Data[Quality issue])

    Measure2 = counta(Data[Status])

6 Replies

  • Hey dd88 ,

     

    I do not understand your requirement, because of the scarce information you provide,

    Create sample data and provide the sample data either using OneDrive, Google Drive, or Dropbox.

    Explain the expected result based on the sample data you provide.

     

    Regards,

    Tom

  • Hi dd88 
    The question isn't entirely clear, so I'll try to guess. If the goal is just to count, since I see it's text, in the first step, I would replace the 'white spaces' with NULL in Power Query, because it's not the same thing from the engine's perspective.

    After closing and applying you can create 2 simple measures for blanks and not blanks:

    Cont non balanks = (COUNTA('Table'[Column]))
    Count blanks = COUNTBLANK('Table'[Column])

    The pbix with the example is attached

    If it is something else 

    please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

    How to Get Your Question Answered Quickly  

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

  • dd88's avatar
    dd88
    Icon for Post Patron rankPost Patron

    apologies Ritaf1983    TomMartens 

     

    I have reread my orginial post, and I accidentally uploaded screen capture version 1. I have updated and uploaded screen capture to version 2.  Hoping this makes it clear.

     

    Column Quality Issue, to count all values and not include blanks

     

    Another count for Column Status to count all values and not include blanks

     

    thank you again ..

    • Ashish_Mathur's avatar
      Ashish_Mathur
      Icon for Super User rankSuper User

      Hi,

      These measures should be dragged to a card visual

      Measure1 = counta(Data[Quality issue])

      Measure2 = counta(Data[Status])