Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi!
Im trying to calculate an average measure per SKU (called "Productivity"). However, when I'm not selecting any SKU, the Averagex-measure leaves me with the "NaN" error. I really hope someone can help me, as I struggle to find a proper solution.
Average Productivity per SKU =
Solved! Go to Solution.
Turns out there were missing days/stores for some items in the calculation and thus the error.
IFERROR solved the problem fine.
Turns out there were missing days/stores for some items in the calculation and thus the error.
IFERROR solved the problem fine.
Hi @emilmorkeberg ,
Typically you get NaN when you try to calcualte 0/0
So we recommend that you use the DIVIDE function whenever the denominator is an expression that could return zero or BLANK.
For your case, i think the DAX you used for [# Days w Sales] is fine, just try to use DIVIDE() instead of /
=DIVIDE( DIVIDE([Sales] / [# Days w Sales]), [# Stores w Sales] )
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@emilmorkeberg , if sales is measure , prefer
CALCULATE(COUNTROWS('Date'),FILTER(values('Date'[Date]),[Sales] > 0))
Also use the divide function
example
divide(divide([Sales], [# Days w Sales]),[# Stores w Sales])
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!