Forum Discussion

Bidu's avatar
Bidu
Frequent Visitor
2 years ago
Solved

How to plot pie chart correctly without creating additional column

Hello everyone, I have one column in my Table with integer values, I want report in a pie chart values > 0 and values == 0, and its percentage, but I dont want to create a additional column with val...
  • tamerj1's avatar
    2 years ago

    Hi Bidu 

    you may create a disconnected single column, two rows table. Inset table manually, rename it like "CetegoryFilter, rename the column "Category" and inter "Yes", "No" in the first two rows. 
    place CategoryFilter[Category] in the pie chart along with the following measure 

    IF (

    SELECTEDVALUE ( CategoryFilter[Category] ) = "Yes",

    COUNTROWS (

    FILTER ( 

    'Table',

    'Table'[Value] = 0

    )

    ),

    COUNTROWS (

    FILTER ( 

    'Table',

    'Table'[Value] > 0

    )

    )

    )