Forum Discussion
M Code Percentage Thresholds
- 5 years ago
Hi, smather
You can try: if text.trim([Phase]) = "Equipment" and [Margin] < 20 then "Below Threshold" else null
If it doesnโt solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The file is giant and connected to our server, unfort I can't share it. Apologies about the screenshots, lemme try again. I can confirm that the margin is down as % and there's no spaces in any of the phase names (or, there isn't at the source).
I'll give an example of my data (and ideally what it should spit out). Each line is a item, be it labour, kit or licences. And at the visual level, it aggreates them together based off the phase.
Here's some screenshots (I made my own margin box, just in case the one pulling through was playing silly):
I just don't understand. All those are for the same project, each line is just another labour day.
Sorry about the new thread, the forum would not let me post a reply to you ๐
Thx smather
Well without the actual data to hand I think I've suggested everything I'd check.
If % Margin is 30% as shown in your images then the only thing I can think of is that there are some non-prining characters or spaces in the Phase col, but you said that's not the case.
Can you please humour me and double check with this new column
= Text.Length([Phase])
Regards
Phil
- smather5 years agoHelper III
Hey PhilipTreacy I was kind of hoping it'd spit out different character lengths because at least thenI'd have a fix
any other suggestions? I'm game to try anything at this point ๐
- smather5 years agoHelper III
I think I've figured it! I changed the formula to say <=0.29 rather than <0.30 and it seems to be spitting out what I expected