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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
kohlivinayak
Resolver I
Resolver I

zero from divide function showing arbitrary value

Hi all 

I am using this below formula 

 

Current PC Contribution = DIVIDE(SUMX(Sheet1,IF(Sheet1[PC - 2]=Sheet1[max pc],Sheet1[Contrib val_3],0)),SUMX(Sheet1,IF(Sheet1[PC - 2]=Sheet1[max pc],Sheet1[Qty in Ton Adjusted],0)),0)

 

for values where contrib val 3 is -650 and qty in ton adjusted is 0 (replaced value from "-" to 0 in query editor) i am getting returned value as 29990370638585590000.00 

 

when i put filters and try to get this single record value for the current pc contribution it shows 0 only, also the grand total is showing correct value.

I am displaying this value in a matrix column.

 

1 ACCEPTED SOLUTION

@kohlivinayak,

 

Just select the column [Qty in Ton Adjusted] and change the data type as shown below.

Capture.PNG

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-chuncz-msft
Community Support
Community Support

@kohlivinayak,

 

I can not reproduce the issue. Share us the .pbix file if convenient. Do mask sensitive data before uploading.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft

 

PBIX File:

https://drive.google.com/file/d/1CbhbmtplRSJxzu-CBVwMWe4zkHUuQj89/view?usp=sharing

 

the value for CSD is comming wrong, though the total is coming out correct.

@kohlivinayak,

 

The denominator is not exactly zero. A decimal number is always stored as a double-precision floating point value. You may change the data type of [Qty in Ton Adjusted] to fixed decimal number from the Modeling tab.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Tried modeling as well as rounding off not working.

@kohlivinayak,

 

It works for your .pbix above, please check again. As a kindly reminder, protect your privacy information.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

can you share that file back

@kohlivinayak,

 

Just select the column [Qty in Ton Adjusted] and change the data type as shown below.

Capture.PNG

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks finaly got it

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.