"...and that is totally insane." LOL, you did it again, Alberto, such a good teacher. This video is an eyeopener for all DAX newbies.
@Milhouse77BS2 жыл бұрын
at 20:19 lol.
@EmanuelAugusto-t7x4 ай бұрын
🎯 Key points for quick navigation: 00:00:00 *⁉️ Introduction to Total Calculation Confusion* - Introduction to the common question about perceived inaccuracies in Power BI total calculations. - Explanation that Power BI computes totals correctly, but the confusion arises from the type of calculation: additive vs. non-additive. 00:02:28 *➕ Additive Calculations and Sum X* - Description and example of additive calculations using a sales amount, where individual row sums equal the total. - Introduction of "Sum X" for calculations and ensuring correctness across different attributes. 00:04:18 *🔄 Understanding Non-Additive Calculations* - Explanation of non-additive calculations using a distinct count of products as an example. - Discussion on the challenges and misinterpretations that occur due to non-additive calculations like the distinct count. 00:05:07 *🧩 Forcing Additivity in Measures* - Demonstrating the method to force additivity on measures, using Sum X with iteration over desired tables or columns. - Observation of potential inaccuracies resulting from forced additivity, particularly issues of double counting. 00:07:59 *⚖️ Challenges with Averaging Averages* - Issues that arise from averaging numbers that are themselves averages, leading to data misinterpretation. - Presentation of a detailed example to illustrate inaccuracies generated when averaging previously averaged values. 00:15:31 *⚗️ Mixing Constants with Calculated Values* - Explanation of loss of additivity when combining constant values with context-dependent calculations. - Further illustrations of the concept using a simple measure involving transactions minus a constant value. 00:21:02 *🧮 Handling Complex Non-Additive Scenarios* - Example of intricacies resulting from a calculation meant to include sales only for countries exceeding a certain amount in sales. - Clarification on rewriting measures to include context iteration to properly reflect intended outcomes. 00:25:47 *🔍 Conclusion: The Importance of Understanding Additivity* - Summary of the importance of distinguishing between additive and non-additive calculations. - Encouragement for DAX developers to assess and adjust calculations for correct total computation by understanding data context and intent. Made with HARPA AI
@HG_Data_Academy11 ай бұрын
I'm in my first job as Data Analyst and the task that they left me was to show some totals on the measures, I was struggling almost 2 weeks watching different videos until I reach this and fix it in a day, thanks! You gain a new subscriber and surely I'll be watching all your videos!.
@BummerSlug2 жыл бұрын
I appreciate that you always seem to have the answers to the question I was still trying to work out. SMH - I’ve been banging my head on my desk trying to figure out why my numbers are wrong.
@mwaltercpa2 жыл бұрын
This is a half hour well spent. Thank you for working through all the different non-additive examples. Makes perfect sense that there are non-additive measures (and totals) for a good reason.
@goldwhispers2 жыл бұрын
totally understand what you saying and I think for developers this is important, i still think it would be good if there was a way to enable it manually to just sum the total rows. However my other feeling is around this complex aspect of dax seems to contradict the whole self service aspect of Power BI that users should be able to just 'play and play' sort of thing. Understanding how totals work requires quite a bit of knowledge and understanding and therefore for Microsoft to promote power bi as a plug and play self service tool its not entirely true as it requires experienced modellers to sit between the data a to create a self service tool so to speak. Not that I am complaining I love my job :)
@ozansen_ozibaba2 жыл бұрын
The Father of DAX! I have never thought like this about additivity vs nonadditivity in simple aggregate calculations like AVG and SUM! Impressive yet suprising!
@etherlords88 Жыл бұрын
SUMX( VALUES(Table[Column]) ,Expression/Calculation/Measure ) worked for me! THANKS!!! This was pain in my bum for weeks!
@joeyCrxck2 жыл бұрын
Great video - I had a customer ask me if I was counting or summing a value twice because they do not understand additivity and non-additivity. I now create their visuals with forced additivity. It's a hassle but worth not having all the questions anymore
@davidirias34592 жыл бұрын
This has being my current problem in a reporte which the grandtotal change dramatically when I change a filter, I'm very grateful with you, Alberto. Regards!
@covid6995 ай бұрын
What if I have 3 tables: Actual, Budget and Date. My Actuals and Budget table have sub categories for example Region. I created a matrix comparing Actuals vs Budget for selected month by Region. My Actual figure is from the Actuals table and my Budget figure is from my Budgets table. The Actuals by Region is summed up correctly but my Budgeted total by Region brings back the total for the year not for that month. For context my Date table has relationships to both my Actuals and Budget table.
@pro14272 жыл бұрын
AMAZING, i was hitting my head on the wall over the DISTINCTCOUNT problem for hous, now i understand the problem. Thanks!!
@mazchen2 жыл бұрын
Apart from the great content (as usual) loving the new beard :-) After two days of desperately trying to summarize products of columns in two tables (for a linear regression model), you helped me to understand why the totals didn't work within the first 15 mins of a video! I just don't understand why this channel is so underrated....
@GoinOff2 ай бұрын
I really hate totals in PowerBi and wish it was more like an excel spreadsheet that adds up all the records on the screen. This is certainly something that shouldn’t be such a pain in the butt.
@junshi9897 Жыл бұрын
Can I ask a question? I am new to the powerBi. I am trying to understand at around 12:50, why we have to add Calculate over AverageX? Is it because of the filter context? Thanks.
@padynz9869 Жыл бұрын
Excellent exhaustive video with impeccable clarity!!! Thank you very much.👌👌🙏🙏
@leandrohugosobrino77412 жыл бұрын
Very very nice examples! At minute 20.06 in the metric "Transactions minus 500 Wrong" you are slicing first by continent and then by country, but the metric remains the same with VALUES (Customer[Continent]). I think you were expecting the total to change when slicing by country but it didn't because it should have change the metric to VALUES (Customer[Country])
@sau_NK6262 жыл бұрын
thanks your video! If i want to use column with year/quater/month,and three months will have a total column to compare the data Is that possible?
@fahadnazir8080 Жыл бұрын
Love you for your videos!!!! The way you articulate complex situations in such a simple way is comendable!
@Urgosandspirit2 жыл бұрын
Thanks a lot! Did I understand right that basically forcing an additive calculation cannot happen for all of the tables / filter context I have in the data model? I will need to choose one or each of them depending on needs of the report?
@SQLBI2 жыл бұрын
The behavior of a measure is defined by the measure itself, not by the report. Visual calculations may change that in the future, but the measures in the model works at the model level.
@tashagrihma60522 жыл бұрын
Thank you so much! This was my issue at work this week. And love the new beard!
@sabzchetty2 жыл бұрын
Been struggling with this. This has really helped me. Thank you!
@Negi_From_Pauri2 жыл бұрын
Hey pal i am big fan of yours, "POWER BI"☺ i have a question about power query we can undo(means delete) the step, So is there any way we can redu(means to get last deleted step) the step. Deleted step could be in any line in applied steps. I am asking because sometimes the step is big we write m query so that we just can redu the step instead of to write m query again.
@marksant5488 Жыл бұрын
Alberto, spot on! You have just helped me out so much, i feel like crying. 🙂 Thank you so much. 😍You, your videos and classes are brilliant. Wishing you the best from Prague.
@rusttaf Жыл бұрын
Great explanation of the problem and the logical reason behind it. Thank you!
@sr57262 жыл бұрын
Why can't Microsoft just have a formatting to optionally turn off totals for measures , also providing a fx button to write how totals need to be calculated when switched on. Writing dax just to get rid of totals is a pain. Rather than focussing on logic, it makes one write more dax code on top of core logic , just to make total look better. Thank you so much for the video
@SQLBI2 жыл бұрын
You can already disable totals and subtotals in the matrix visual in Power BI. However, it's a visual feature, not a model one.
@abhijeetghosh2711 ай бұрын
This is awesome. Saved my day 😀👍 Appreciate you creating these great learning content and sharing it with us. Thanks!
@michaeldes95662 жыл бұрын
Thank you, these instructions are very helpful. Kind of a shame that browsing Microsoft's forums are a total mess if you want to understand how this works (for something that should be a simple task).
@nishantkumar95702 жыл бұрын
Can we make the field inside VALUES( ) dynamic using parameter? Like the columns used as dimension for the summarization can be fed into VALUES( ).
@MDevion2 жыл бұрын
Honestly it has always been this way, see MD cubes and MDX. Now I understand from a newbie perspective, but there are some "seniors" who make a fuss about this, who simply don't understand simple programming logic. DistinctCount is a perfect example. What Dax IS missing is lastchild, first child etc.
@datasapien2 жыл бұрын
Bearded Alberto is the best Alberto yet.
@galymzhankenesbekov7242 Жыл бұрын
Thank you for an amazing video, could you please show the modified version of Average ( a.k.a weighted average). I have a problem that I have two columns the first is average and the second are the values which will be used as weights.
@SQLBI Жыл бұрын
You might consider something like AVERAGEX ( table, table[a] * table[w] )
@hnp2502 жыл бұрын
This is PURE GOLD!! Thank you SQLBI
@juanpablorvvv2 жыл бұрын
So how do we get rid of totals in no additive measures? How do we force a blank value in the total?
@SQLBI2 жыл бұрын
In DAX you can use ISINSCOPE (better) or HASONEVALUE (slower) to identify whether you are not at the desired granularity. In Power BI, you can disable the totals for each visual.
@Pegasusjumpingoff Жыл бұрын
omg thank you very much a small solution that resolves my headache for half a week
@zerayacobhabemariam27262 жыл бұрын
Very good video Can you make a video on transaction or number of transaction frequencies
@thepakcolapcar2 жыл бұрын
Very nice explanation. I am working on similar situation where it involves absolute vales (i.e. using ABS function). And I am facing similar mismatch of totals between sum of rows and the totals row. Can I say ABS is also a non-additive and therefore the mismatches in totals is expected?
@SQLBI2 жыл бұрын
If you sum original values, it's easy to consider it additive as long as you aggregate two SUM by filtering positive and negative numbers in each one. If you sum semi-aggregate values and you must consider the ABS, that's a different story.
@konstantinvolke45692 жыл бұрын
Thank you Alberto for this video. This is a fairly simple scenario with no hierarchy on the rows. I understand that additivity can be achieved by iterating over the granularity of the table. For instance if I want to see the #transactions-500 by product color and continent I would need to create an iterator e.g. by using SUMMARIZE(Sales, [continent], [product_color]), correct?
@SQLBI2 жыл бұрын
Correct!
@mohanravi35322 жыл бұрын
Hi, Can you please elaborate how to form DAX for the above said scenario using Summarize function?
@visheshjjain2 жыл бұрын
What would be the behaviour of the totals, when variables are used in such scenarios? Apart from teaching us what to do, thank you for teaching us what not to do as well! 🙏
@SQLBI2 жыл бұрын
Variables are constants used in part of the evaluation - they do not affect this behavior. Thanks!
@yangfantan22478 ай бұрын
excellent and elegant explanation!!
@sbn48622 жыл бұрын
it's 8's month that I always wondered why it's so. and not always can correct. Thank you. It's 3th time I see it today ;)
@mohanravi35322 жыл бұрын
Such a great explanation Sir! I've understood dax functions more clearly. Thanks a lot!! But sir, what if I add more dimensions, for an example if I add continent and country, then how should I correct it in dax? Can I add two column names in VALUES() funation?
@ozansen_ozibaba2 жыл бұрын
VALUES() doesn't accept 2 column names by syntax. You will need summarize() function then!
@SandeepBecomer2 жыл бұрын
How to dynamically force additivity for the last example (sales amount gt $1M) based on selected dimension from Field Parameters (of multiple columns/dimensions)?
@SQLBI2 жыл бұрын
That's not possible, you cannot easily adapt the DAX code to the field parameters selection. You could try by using ISINSCOPE on specific columns, but the code would be long and complex to maintain, plus possible performance issues.
@kavisimbu738311 ай бұрын
In this , How to apply additive forcefully whenever the user selects any field from any table.
@beginho24542 жыл бұрын
Thanks Alberto all the time 👏🏻👏🏻
@S65M3_Enthusiast Жыл бұрын
Thanks very much for this. Tremendously helpful a dashboard I'm working on. You have a new subscriber sir!
@Jules-d2d Жыл бұрын
Why did you leave the product count, the first calculation incorrect? Since you showed how to make count additive, shouldn't you show how to obtain a correct subtotal as well?
@ukaszbalcerzak31912 жыл бұрын
Hello SQLBI, thanks you for another amazing video. While working with DAX I'm often faced with the challenge to discover wether a calculation is additive in general (like sum of sales) or maybe it is not additive and over some dimensions. Is there a universal way of checking wether a formula is additive or not ? Usually I just try to understand the calculation and test it. All best
@SQLBI2 жыл бұрын
Not directly, it should be documented by the model author or implicit in the business meaning of the measure. Otherwise, you have to analyze the code.
@luisfernandomacedo14512 жыл бұрын
As always, another great explanation on one the of most intriguing topics. I am newbie to BI, and your videos has helped me a lot.
@alvarorodriguezlasso2 жыл бұрын
Guao, fantastic, regards from Cali-Colombia
@sherifffruitfly2 жыл бұрын
If Power BI added up my Distinct Customer Count measure in the Total row, I would stop using Power BI.
@SQLBI2 жыл бұрын
:)
@ThuyTruong-wo6fr Жыл бұрын
Thank you so much! Very easy to understand!!!!
@reshmaarapura65122 жыл бұрын
Thank you for the excellent explanation.
@SandeepBecomer2 жыл бұрын
20:41 That's totally insane!
@mauriciovillatoro9361 Жыл бұрын
Shouldn't it be easier to just sum the visible amounts in the visual?
@pedja25182 жыл бұрын
Very nice explained.Thank you!
@successfullife7689 Жыл бұрын
Helped alot ! Thank you very much.
@momenemoradi91463 ай бұрын
That was brilliant! 🤩
@HoaNguyen-ji5fz Жыл бұрын
Great video. Thank you
@vasilisa6128 Жыл бұрын
Thank you! It solved my problem.
@CleitondaSilvaLeal Жыл бұрын
Thats Amazing, thanks for sharing this.
@kishoremohanraj72002 жыл бұрын
In my case the measures total is showing Zero, I tried some ways to make it right but it is not working🥲
@mategombas7712 жыл бұрын
Nice work Santa!
@ianmaddrell22472 жыл бұрын
Great explanation
@dariuszspiewak56242 жыл бұрын
First time I can see Alberto with a beard :) Alberto, you look quite alright! :)
@SM23Studio11 ай бұрын
thanks, it's clear explanation
@edgards Жыл бұрын
Thanks Maestro!
@JMcLeodKC7112 жыл бұрын
Gotta love this stuff….distinct count baby
@saqibsa1008 ай бұрын
You are a champion!
@haroldm.7325 Жыл бұрын
Excellent video ¡
@robertkiermasz4513 Жыл бұрын
vary good tutorial.
@pabeader19412 жыл бұрын
The # of Products column is misnamed. # of Products implies ALL products. It should be named # of Distinct Products. Then there would be less chance of confusion. # of Products IS additive. Since DAX doesn't know what you named the column, you need to make sure you name it correctly. Maybe it should be named Total either? Should be named Unfiltered instead since it's the DAX measure without the row filters.
@SQLBI2 жыл бұрын
It depends. In many businesses, # of Products is exactly what you meant with # of Distinct Products. Too long names might be disruptive in the report, better to rely on meaningful descriptions in those cases.
@rahulverma-pg1bk9 ай бұрын
Really nice video
@fernandonavarrete15412 жыл бұрын
PLIS TRANSLATE TO SPANISH ORIGINAL , the IA KZbin is very poor ....tks
@datamandy89752 жыл бұрын
Well Explained!!!!
@Aquaelus Жыл бұрын
This was a Insane Eyeopener 😳
@yordanosadigo Жыл бұрын
YES .... Thank you !
@andysuzhou79562 жыл бұрын
Well explained!!!
@rasmusl83702 жыл бұрын
Sooo waiting for your comment, Greg Deckler... 😅
@atanasprodatanasov92332 жыл бұрын
Yes... I can't understand all the complaints about that. It is the way DAX works. And still can't understand why anyone would like to force additivity to non- additive measures... He already made a video where he says he does not agree with Alberto's explanation...
@jay68176 ай бұрын
"And that is totally insane" 😂
@osielgutierrez78372 жыл бұрын
Greats, regards
@alexrubin5955 Жыл бұрын
This is BS. How are other reporting tools able to do this? No disrespect to anyone.
@SQLBI Жыл бұрын
Please, can you clarify what you do you mean with that?
@alexrubin5955 Жыл бұрын
@@SQLBI Sorry, I was not referring to your explanation of DAX. It's just that, in 2023, it's a darn shame that Microsoft's tool does not have a feature that takes care of this problem out of the box.
@Jules-d2d Жыл бұрын
It's not my dax that is wrong. The auto row subtotal is wrong, lol, & we cannot change that