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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
GAPER
Post Patron
Post Patron

It keeps giving me this error

GAPER_0-1709542591201.pngGAPER_1-1709542600449.png

 

What data format should i choose? Thanks. 

 

Basically i wanna show n/m when the values > 100 but keeping the format as original. 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @GAPER ,

According to the error message, it seems that the problem is caused by the data type mismatch. Please try the following methods and check if they can solve your problem:

1.Please make sure the measure have the correct data type.

vjiewumsft_0-1710119535738.png

2.ABS function returns the absolute value of a number. Verify the data and _amount variable result is correct.

3.Try to use the format function.

FORMAT function (DAX) - DAX | Microsoft Learn

4.You can also view the following link to learn more about calculation error.

Solved: MdxScript(Model) / Calulcation error in (...) - Microsoft Fabric Community

 

If the above ones can’t help you get it working, could you please provide more raw data(exclude sensitive data) with Text format to make a deep troubleshooting? It would be helpful to find out the solution.

You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

Best Regards,

Wisdom Wu

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

 

 

 

Daniel29195
Super User
Super User

@GAPER 

the amount variable in some cases, is returing 'n/m' , whcih then you are comparing with a number ( = 100) . 

 

in the return statement

RETURN 

switch(

true () ,

isnumber(_amount) , 

if( abs(_amount) > 100 , "n/m", _amount ),

_amount 

)

 

 

let me know if this helps .

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.