Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
What data format should i choose? Thanks.
Basically i wanna show n/m when the values > 100 but keeping the format as original.
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.
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.
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! 🤠
User | Count |
---|---|
82 | |
72 | |
67 | |
47 | |
36 |
User | Count |
---|---|
111 | |
56 | |
50 | |
41 | |
40 |