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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
kauhsik_11
New Member

SUMX function in Measure is returning wrong Value

So basically i want the Monthly average of a particular KPI but the monthly average is calculated based on whter the daily percentage is above or below a set target.
so for example if a KPI is above 90%(which is the target), it is considered as 100% but if it is 89% it is considered as 89%
so when i use SUMX to find the Monthly avg in the KPI card its returning wrong value.

 

 

The las column is a calculated column i am using to calculate the monthly Average as mentioned aboveThe las column is a calculated column i am using to calculate the monthly Average as mentioned above

So her the monthly avg in Percentage would be
[ {sum of "total FC"- sum of number of loss (CC)} / sum of Total FC ] which will be 279-27/279= 90.32%
but for some reason its showing 89.89%

kauhsik_11_0-1707302107823.pngkauhsik_11_1-1707302140135.png


This is the Measure i used to calculate the avg.

Monthly Average =
 Divide(
    SUMX(OFCP, OFCP[Total FC (nos.)]) - SUMX(OFCP, OFCP[Number of loss (CC)]),
   
SUMX(OFCP, OFCP[Total FC (nos.)])
)
Even if i use only the SUM() function the value is wrong
FYI I only know DAX but not M Code or Visual Basics
Thanks in advance


3 REPLIES 3
Anonymous
Not applicable

Hi @kauhsik_11 

 

After my testing, I've tried both methods and I don't have the problem you're experiencing.

vxuxinyimsft_1-1707378725947.png

 

vxuxinyimsft_2-1707378782446.png

 

Here are my suggestions:

 

  • Create two different measurements and check if the answers obtained from the following two formulas are correct.
SUMX(OFCP, OFCP[Total FC (nos.)])
SUMX(OFCP, OFCP[Number of loss (CC)])

 

  • Is the Target field the source data or is it calculated? In my testing, the Target field is the source data.

 

Best Regards,
Community Support Team _Yuliax

 

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

Ashish_Mathur
Super User
Super User

Hi,

Share data in a format the can be pasted in an MS Excel file and show the expected result very clearly.


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

Hi,  I recreated your problem and I didn't get the wrong value you mention.  Make sure that you don't have any filter or any item in the visual highlighted, that could be could posibly be excluding values. 

Bmejia_0-1707341598084.png

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors