Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
inglexjc
Post Patron
Post Patron

Pie chart to show data from different columns with certain filters

I'm needing a pie chart to show data from 5 different columns but to show when the following filter is relevant.

Income Type <> null

Is rent correct?  <> null or Yes

Are utilities correct? <> null or Yes

Are other expenses correct? <> null or Yes

Are there other errors? <> null or no

 

Data:

 

Item IDIncome TypeIs Rent Correct?Are utilities correct?Are other expenses correct?Are there other errors?
9304043879nullYesYesYesNo
9304917426nullYesYesYesNo
9306440514EarnedYesYesYesNo
9335837372UnearnednullnullYesNo
9343613338EarnednullnullnullYes
2 ACCEPTED SOLUTIONS
v-ssriganesh
Community Support
Community Support

Hello @inglexjc,
Thank you for reaching out to the Microsoft Fabric Community Forum. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.


Visuals like Pie Chart, Bar/Column Chart, or Matrix will show exactly what you need, but only if you unpivot the data in Power Query and use a DAX measure. This ensures that all check types and responses are evaluated properly in the same visual.

For your reference, I’m also attaching a .pbix file so you can review the applied logic and visuals directly.

Best Regards,
Ganesh Singamshetty.

View solution in original post

Hello @inglexjc,
I tested your revised logic, and I am seeing the same result you shared only “Are there other errors?” appears in the visuals. This happens because, in the current dataset, all values for Rent, Utilities, Expenses are "Yes" or blank, and your condition requires them to be "No" to be counted.

So, the measure is working as expected it’s just that the sample data does not contain "No" values for those checks.

Best Regards,
Ganesh Singamshetty.

View solution in original post

11 REPLIES 11
v-ssriganesh
Community Support
Community Support

Hello @inglexjc,
Thank you for reaching out to the Microsoft Fabric Community Forum. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.


Visuals like Pie Chart, Bar/Column Chart, or Matrix will show exactly what you need, but only if you unpivot the data in Power Query and use a DAX measure. This ensures that all check types and responses are evaluated properly in the same visual.

For your reference, I’m also attaching a .pbix file so you can review the applied logic and visuals directly.

Best Regards,
Ganesh Singamshetty.

@v-ssriganesh we have the response wrong.  It should be if 

                        "Is Rent Correct?",
                        "Are utilities correct?",
                        "Are other expenses correct?"
                    = "No"
             
                     "Are there other errors?"   "Yes"
 
So I just changed your "No" to "Yes" and the "yes" to "no"  but then the visuals don't show right.
 
Code used: 
Valid Responses =
CALCULATE (
    COUNTROWS ( 'Data' ),
    FILTER (
        'Data',
        NOT ISBLANK ( 'Data'[Income Type] )   -- Exclude blank Income Type
            &&
            (
                (
                    'Data'[Check Type] IN {
                        "Is Rent Correct?",
                        "Are utilities correct?",
                        "Are other expenses correct?"
                    }
                    && 'Data'[Response] = "No"
                )
                ||
                (
                    'Data'[Check Type] = "Are there other errors?"
                    && 'Data'[Response] = "Yes"
                )
            )
    )
)
 
inglexjc_0-1755710767758.png

Only 1 check type is showing.

           
   

So with the code I put earlier Income and other errors are showing but Utilities is not and it should:

inglexjc_0-1755717853588.png

inglexjc_1-1755717894860.png

 

Hello @inglexjc,
I tested your revised logic, and I am seeing the same result you shared only “Are there other errors?” appears in the visuals. This happens because, in the current dataset, all values for Rent, Utilities, Expenses are "Yes" or blank, and your condition requires them to be "No" to be counted.

So, the measure is working as expected it’s just that the sample data does not contain "No" values for those checks.

Best Regards,
Ganesh Singamshetty.

I under stand now.  Income is blank so for that "Item" so it's not counting it.  My brain finally kicked in when I took that exclusion it's showing as needed.

 

Thank you!

There are no other errors.  When I create a table to show the responses you can see a "No" for income AND Utilities.  But only Incme is showing in the Pie.

 

Then YES for Are there other errors (so this is correct).

 

But the valid response formula is not picking up the response from Utilities like it should.

inglexjc_0-1755783624645.png

Here is the raw data.

Item IDIncomeIncome TypeRentUtilitiesAre other expenses correct?Are there other errors?
9304043879YesnullYesYesYesNo
9304917426YesnullYesYesYesNo
9306440514NoEarnedYesYesYesNo
9335837372NoUnearnednullNoYesNo
9343613338NoEarnednullnullnullYes

 

The formula being used for Valid Responses:

Valid Responses =
CALCULATE (
    COUNTROWS ( 'Case Review Visual' ),
    FILTER (
        'Case Review Visual',
        NOT ISBLANK ( 'Case Review Visual'[Income Type] )   -- Exclude blank Income Type
            &&
            (
                (
                    'Case Review Visual'[Check Type] IN {
                        "Rent",
                        "Income",
                        "Utilities",
                        "Are other expenses correct?"
                    }
                    && 'Case Review Visual'[Response] = "No"
                )
                ||
                (
                    'Case Review Visual'[Check Type] = "Are there other errors?"
                    && 'Case Review Visual'[Response] = "Yes"
                )
            )
    )
)

 

@v-ssriganesh thank you so much! I did have to create a new table to match what you did but it worked!  Thank you.

Ashish_Mathur
Super User
Super User

Hi,

A pie can only be created from 2 columns.  In PQ, select the first column, right click and select Unpivot other columns and click on Close and Load.  Now apply your filters and create a pie chart.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Is there a visual that will do what I'm needing?

Right if I do a normal filter I'm only left with one response.  Is there a visual that will show each column response that meets that filter without being canceled out from the other filters?  They are wanting to show this all in one visual. 

Income Type <> null

Is rent correct?  <> null or Yes

Are utilities correct? <> null or Yes

Are other expenses correct? <> null or Yes

Are there other errors? <> null or no

Irwan
Super User
Super User

hello @inglexjc 

 

i might be misundersood but i assume those 5 conditions will work in OR operator so your filters seem to remove all data in that sample data, no?

 

The 4th condition will remove the 1st up to 4th line of your sample data.

you want to show data when "Are other expenses correct? <> null or Yes"

 

The 3rd condition will remove the 5th line of your sample data.

you want to show data when "Are utilities correct? <> null or Yes"

 

Thank you.

 

Right if I do a normal filter I'm only left with one response.  Is there a visual that will show each column response that meets that filter without being canceled out from the other filters?  They are wanting to show this all in one visual. 

Income Type <> null

Is rent correct?  <> null or Yes

Are utilities correct? <> null or Yes

Are other expenses correct? <> null or Yes

Are there other errors? <> null or no

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.