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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Pbiuserr
Post Prodigy
Post Prodigy

Pie chart gives wrong results

I have a calculation 

 

% of ontime =
VAR _Prc =
    DIVIDE (
        CALCULATE (
            [CountOfOrders],
            'table'[status] = "Ontime"
        ),
        [CountOfOrders],
        0
    )
RETURN
    IF ( _Prc = BLANK (), 0, _Prc )
 
and a pie chart where I've put Status as legend and CountOfOrders and value, went into detailed labels and choose datevalue, percentage. and the distribution is bad! Integers are okay but % not 2640/4088 is 64.58%, not 57,57%. My goal is to align the KPI with % of OnTime with percentages on a chart, and keep integers values as well. If I go to CountOfOrders and "show as grand total" the % are good, but in the tooltip it shows % on data value. Is there a way? Filter context is the same
 
Pbiuserr_2-1680186206291.png
2 REPLIES 2
lcorbet
Regular Visitor

I have this issue also.  What I find is that if you count the unique values of the Status, that is the total the pie chart is calculating against, not the number of orders. 

 

For example, if I had the following:

order#Status
123A
123B
456A

 

I would calculate the denominator as the distinct count unique order = 2 and expect %A = #A / 2

The pie chart is calculating the denominator as the count of Status = 3 and then #A/3

 

Hope that makes sense. 

Alf94
Solution Supplier
Solution Supplier

Hello,

 

From what I see you have more than 4088 orders in your piechart (2640 + 1035 + 911 = 4586), that's why your percentage is not the same (2640 / 4586 = 57.5%) as in the KPI. Are you sure you do not have different filters applied on your KPI and your pie chart?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.