Forum Discussion
Anonymous
4 years agoNot applicable
if when column in power query
Hi all, I am struggling to get a if when statement to work as a calculated column in power query. the logic I am trying to create is: if [sales] > 0 where [region] = AMER and [returns] < 1 ...
- 4 years ago
Hi Anonymous ,
Try to create a custom column with Power query:
if [Region]= "a" and [Returns] <1 and [Sales]>0 and List.Contains({1,2,3},[Type]) then 1 else ""
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
V-lianl-msft
Community Support
4 years agoHi Anonymous ,
Try to create a custom column with Power query:
if [Region]= "a" and [Returns] <1 and [Sales]>0 and List.Contains({1,2,3},[Type])
then 1 else ""
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
V-lianl-msft I keep getting this error when using this logic: [Expression.Error] We cannot convert the value null to type Logical.
how fo you handle this?
- Anonymous4 years agoNot applicable
also thank you V-lianl-msft