Forum Discussion
AlBud
4 years agoFrequent Visitor
M Query - If Then Else
Hi all, I'm having trouble with the below in Power Query when creating a new custom coloumn. if [ATA Final Destination Port] > = [ETA Final Destination Port] then [ATA Final Destination Port]...
- 4 years ago
Hi, AlBud ;
You could try it.
if [ATA Final] = null then List.Average(#"Changed Type"[Port]) else nullThe final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlBud
4 years agoFrequent Visitor
Hi Vijay,
That lets me create the new coloumn but I get an error now in the column. I'm wondering if this is due to me have errors in the [Port To Store].
Vijay_A_Verma
Most Valuable Professional
4 years agoYou can enclose your formula in a try otherwise block.
= try your_formula otherwise null
- AlBud4 years agoFrequent Visitor
Hi Vijay,
If I understood what you've suggested (I'm new to M Query) the below is what I've done and the error I get.
- Vijay_A_Verma4 years ago
Most Valuable Professional
You need to bring otherwise null before last bracket.