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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
tedbuny
Regular Visitor

Avoiding 'Infinity' and 'NaN' Results in PBI Calculation

We use a live connection for PBI reporting. I'm trying to divide a sales measure by the 'units per case' field in related dimension table. The formula below works BUT when a item doesnt have a value or contains a zero for the unit per case amount the record returns with 'Infinity' and 'NaN'. 

 

Estimated Cases = SUMX('ActualSales', 'ActualSales'[SalesNetQty] / RELATED('ProductDetail'[UnitsPerCase]))

 

Any help would be appreciated.. thanks

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

1 REPLY 1
HotChilli
Super User
Super User

Use the DIVIDE function https://dax.guide/divide/ 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors