JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
I'm stuck trying to code: If [Label] does not contain ".0" Then [Sum] = null, Else [Sum] = [Sum]
{Sum] contains null or whole numbers only, range -100 to 10 (Max always 10, potential minimum -infinite, -100 as proxy)
This works only for -8
This works for whole numbers (not tested for > 9)
But doesn't work for negative numbers (I tried {-9..9} as well)
Ultimately, I'm trying to achieve
But can't figure out the M code
TIA,
Jack
I'm stuck trying to code: If [Label] does not contain ".0" Then [Sum] = null, Else [Sum] = [Sum]
{Sum] contains null or whole numbers only, range -100 to 10 (Max always 10, potential minimum -infinite, -100 as proxy)
This works only for -8
Power Query:
=Table.ReplaceValue(#"Filter Rows", -8, null, Replacer.Replace.ReplaveValue,{"Sum"})
This works for whole numbers (not tested for > 9)
Power Query:
=Table.ReplaceValue(#"Filter Rows", {0..9}, null, Replacer.Replace.ReplaveValue,{"Sum"})
Ultimately, I'm trying to achieve
Power Query:
"Each If [ColA] does not contain ".0" Then Null Else [Sum]"
TIA,
Jack