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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How do I get rid of the "Infinity" from my DAX?

Hi All,

 

I have the below DAX that works for the dates selected but on either side of the range selected I get "infinity" entries on my row.

 

Please see below - Is there something I need to omit from the below to avoid this?

 

var Priorweeks = if(MAX('Plan PBI_GTS_SIOP_Supply_Demand'[Relative Quarter]) >= 0 && max('Plan PBI_GTS_SIOP_Supply_Demand'[Relative Quarter]) = 0,

calculate(max('Plan PBI_GTS_SIOP_Supply_Demand'[Forecast (RXN)])-

sum('Plan PBI_GTS_SIOP_Supply_Demand'[PriorWeekSum]), REMOVEFILTERS('Plan PBI_GTS_SIOP_Supply_Demand'[Fiscal Year Week Number])), blank())

return

IF (MAX('Plan PBI_GTS_SIOP_Supply_Demand'[Relative Quarter])>0, SUM('Plan PBI_GTS_SIOP_Supply_Demand'[Dynamic Demand Column]),

IF(MAX('Plan PBI_GTS_SIOP_Supply_Demand'[Relative Week])<0, SUM ('Plan PBI_GTS_SIOP_Supply_Demand'[Actual Shipments Forecasted Demand]),

IF(MAX('Plan PBI_GTS_SIOP_Supply_Demand'[Relative Quarter])=0 && MAX('Plan PBI_GTS_SIOP_Supply_Demand'[Relative Week])>=0,

Priorweeks/max('Plan PBI_GTS_SIOP_Supply_Demand'[PBI Fiscal_Calendar - Week Level.Remaining Weeks])

)))
 
Elmo333_0-1643744110683.png

Thanks Folks 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

Instead of using / for division use DIVIDE here:

DIVDE(Priorweeks,max('Plan PBI_GTS_SIOP_Supply_Demand'[PBI Fiscal_Calendar - Week Level.Remaining Weeks]))

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

Instead of using / for division use DIVIDE here:

DIVDE(Priorweeks,max('Plan PBI_GTS_SIOP_Supply_Demand'[PBI Fiscal_Calendar - Week Level.Remaining Weeks]))

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@ValtteriN Hero, thank you so much for this. It has been driving me mad for a while now.

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.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.