Forum Discussion
AlBud
3 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]...
- 3 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.
Vijay_A_Verma
3 years agoMost Valuable Professional
You can enclose your formula in a try otherwise block.
= try your_formula otherwise null
AlBud
3 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_Verma3 years agoMost Valuable Professional
You need to bring otherwise null before last bracket.