Creating functions Power Query allows you to create your own functions, which can be useful…