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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
1 REPLY 1
Alf94
Super User
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.