cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Chart data contains not a number (NaN) values

Hello there,

 

I hope that somebody can help me. I have the dreaded “Chart data contains not a number (NaN) values.”, message and I don’t think that I am dividing by Zero. Here is my DAX Code:

 

Inventory = SUMX(SUMMARIZE('mvdt V_PSI_DailyInventory',[GCAS_Code],[Inventory_Date],"Inventory Qty", if(FIRSTNONBLANK(BUOM[BUOM],1)="CS",AVERAGE([Cases_Inv]),if(FIRSTNONBLANK(BUOM[BUOM],1)="IT",average([Cases_Inv])*AVERAGE([ItemPerCase]),average([Cases_Inv]) * AVERAGE([SU_Factor])))),[Inventory Qty])

 

Is there a quick fix for this J

3 REPLIES 3
Community Support Team
Community Support Team

Re: Chart data contains not a number (NaN) values

Hi @Anonymous,

 

Could you please check whether all your columns are in number format? Kindly share your pbix to me to have a check if possbile.

 

Regards,

Frank

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

Re: Chart data contains not a number (NaN) values

Hi @Anonymous,

 

Has your issue been solved? If any other question, feel free to let me know please.

 

Regards,

Frank

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

Re: Chart data contains not a number (NaN) values

@v-frfei-msft,

 

Thank  you for your reply. I wasn't able to fix this issue yet. 

 

From the above DAX code I looked at each column and found the following data:

 

[GCAS_Code] = Only Numbers (e.g. 82845734)
[Inventory_Date] = Only Numbers (e.g 12/6/2018)
* [Cases_Inv] = Contains '0' or 'NaN' values
[BUOM] = Contains (Blank) or 'CS' text values
[ItemPerCase] = Contains (Blank) or Number values
[SU_Factor]  = Contaions Number values
[Inventory Qty]  = Contains Number values

 

The Cases_Inv Column acutally has 'Nan' writen in it, which might be causing the problem.

Thje Cases_Inv is a calcualted column and the DAX is as follows:

 

Cases_Inv = if([BUoM]="CS",[Inventory_Qty],[Inventory_Qty]/[ItemPerCase])

 

Do you think I could change anything in the above, so I don't get the 'NaN' result?

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 41 members 1,033 guests
Please welcome our newest community members: