Forum Discussion

send2mark's avatar
send2mark
Frequent Visitor
2 years ago
Solved

Pie chart to count empty and non-empty fields

I am using a pie chart show how much of my documentation is missing in a dataverse table. So let's say I have 30 line item and I am missing 10 in a column called Owners. The pie chart should show 20 filled in and 10 that are empty.

 

Right now it is showing me total items and total filled in.

  • Hi send2mark 
    If your table is like this:

    You can create 2 measures like :

    completed = CALCULATE(DISTINCTCOUNT('Table'[Document id]),'Table'[Owner]<>"")
    Not completed = CALCULATE(DISTINCTCOUNT('Table'[Document id]),'Table'[Owner]="")
    Result :

    If Your table is like :

    The measures will be :

    completed_2 = CALCULATE(DISTINCTCOUNT('Table (2)'[Document id]),FILTER('Table (2)',Not ISBLANK('Table (2)'[Owner])))
    Not_completed_2 = CALCULATE(DISTINCTCOUNT('Table (2)'[Document id]),FILTER('Table (2)',ISBLANK('Table (2)'[Owner])))
    Pbix withe example is attached

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

3 Replies

  • Hi send2mark - Any sample data or snapshot of pie chart helps to understand about the current situation. can you please share it.

    Did I answer your question? Mark my post as a solution! This will help others on the forum!
    Appreciate your Kudos!!

      • Ritaf1983's avatar
        Ritaf1983
        Super User

        Hi send2mark 
        If your table is like this:

        You can create 2 measures like :

        completed = CALCULATE(DISTINCTCOUNT('Table'[Document id]),'Table'[Owner]<>"")
        Not completed = CALCULATE(DISTINCTCOUNT('Table'[Document id]),'Table'[Owner]="")
        Result :

        If Your table is like :

        The measures will be :

        completed_2 = CALCULATE(DISTINCTCOUNT('Table (2)'[Document id]),FILTER('Table (2)',Not ISBLANK('Table (2)'[Owner])))
        Not_completed_2 = CALCULATE(DISTINCTCOUNT('Table (2)'[Document id]),FILTER('Table (2)',ISBLANK('Table (2)'[Owner])))
        Pbix withe example is attached

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