In this writing, I want to share how I started to learn and practice the MATCHBY DAX function that came out in May 2023.
Link to Microsoft documentation: MATCHBY function (DAX) - DAX | Microsoft Learn
When I started using this function, I realized I might use this more when creating a calculated column using WINDOW family DAX functions.
For my practice purpose, I created a sample table like below.
Let's say, there is a request to create a calculated column that describes cumulative sales in each category.
The result looks like below.
I also tried a slightly different way to create the same result, but it showed an error.
This way of writing the calculated column came up to me because I thought SUMMARIZE(Data, Data[Category], Data[Sub_Category], Data[Product], Data[Sales]) and the table name Data are the same. But I was wrong.
The latter one, which showed an error, however, is a simpler way to create a calculated column that supposes to show the same result.
And now, this error can be fixed by using the MATCHBY DAX function inside the WINDOW DAX function.
I need to play with MATCHBY more, but for now, I start to enjoy using it.
Do you also have experiences that solved an error by using the MATCHBY DAX function? Then, please share it and I love to learn more about the power of the MATCHBY DAX function.
I hope this helps to start playing with the MATCHBY DAX function in Power BI.
Comentarios