Forum Discussion
Caitlin_Knox
Advocate III
9 years agoIF formula based on format of value
I'm wondering if anyone has any suggestions for me. I have a column that contains multiple values. The format of these values determines the type (2 types). The determinig factor is an added '-' + di...
- 9 years ago
Or you can use the "Add conditional column" functionality.
Coincidentally, Sean and I responded to a similar question today.
Anonymous
9 years agoNot applicable
Hi Caitlin_Knox
Assuming the first three values are numbers and not text then the code would be:
let
source = #table( {"value"},
{
{100},{200},{300},{"300-01"},{"100-01"},{"200-01"},{"200-02"}
}),
#"added custom" = Table.AddColumn(source, "type", each try
if Number.IsNaN([value]) then null else "a" otherwise "b")
in
#"added custom"
MarcelBeug
Community Champion
9 years agoOr you can use the "Add conditional column" functionality.
Coincidentally, Sean and I responded to a similar question today.
- Anonymous9 years agoNot applicable
this is weird!
there is no such option in the German Version!
Am I missing something?
ImkeFhave you also observed this ??
- MarcelBeug9 years ago
Community Champion
The column should be formatted as text (or only contain text), then you will have the "Contains" option.
- Anonymous9 years agoNot applicable
ok. Thanks MarcelBeug
- Caitlin_Knox9 years ago
Advocate III
Thank you, this was just what I needed