Excel YEARFRAC function for Power Query

While there is a native YEARFRAC-function in DAX that you can use to calculate year fractions, sometimes you might just need it in Power Query. The function I’m presenting here has the same function arguments than its Excel-equivalent. Its 5 different modes require some advanced calculations. Fortunately I found a great resource on how to … Read more

Excel WORKDAY equivalent in Power Query and Power BI

If you want to transform your Excel calculations over to Power Query you might appreciate functions there that have the same syntax like in Excel itself. Today I’m going to share the Power Query function for the Excel WORKDAY function. It has exactly the same function parameters than its Excel equivalent. (If you came here … Read more

Transforming multiple columns at once with reference to existing column in Power Query

In this article I’m going to present a method about transforming multiple columns at once in a fast way. This method also allows you to reference columns that exist in your table already. As I have described in a previous article, this cannot be done using the native Table.TransformColumns function that will be applied if … Read more

Excel NORM.INV function in Power Query and Power BI

The Excel NORM.INV function hasn’t made it into the standard library of M functions for Power Query yet. So here I’m sharing a custom function that replicates it. Excel NORM.INV function in Power Query The Excel NORM.INV function returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. So unlike … Read more

Black Scholes Option Pricing with Power Query in Power BI

The Black Scholes formula returns the value of European put and call options. The version I’m sharing here uses the standard normal cumulative distribution function from my previous blogpost. Algorithm For the implementation of this formula in M, I’ve used the R implementation from Financetrain for the ease of use: BlackScholes <- function(S, K, r, … Read more