Why DAX SUM() Function is Broken and How to Fix It

This is not a click bait – the SUM() function in DAX is indeed broken in my opinion. Just try to add a calculated column with a SUM(…) of another column in the create column formula and then do the same but with a CALCULATE(SUM(…)) and you will see that these will produce two absolutely different results. Luckily, SUM() works as expected when used in measures. However, as you start using SUM() in conjunction with functions like ADDCOLUMNS(), GENERATE(), SUMMARIZE(), etc., you are likely to get yourself in a situation when you calculation produces unexpected results and the culprit will be this inconsistency in SUM() function behavior.

Unfortunately, SUM() is not the only function that can bite you in the butt, many other functions can too. I go into more details in my video and then walk you through the solutions on how to never be stuck with having to troubleshoot this issue in the future.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s