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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.