No video

Working with AverageX and Summarize to create averages in DAX

  Рет қаралды 40,519

MitchellPearson

MitchellPearson

Күн бұрын

In this video Mitchell takes a look at some of the challenges that exist when working with averages and then how you can use a combination of DAX functions to work around those challenges. With Summarize and AverageX you can easilY create the averages you want.
We also take a look at modifying the filter context to include the last 3 months of data with the CALCULATE function and DATESINPERIOD! Enjoy the video!
If you want to explore formal DAX training including live bootcamps and recorded class content, please check out pragmaticworks...
#MitchellPearson #MitchellSQL #PragmaticWorks

Пікірлер: 89
@nikolaynikolayevich4469
@nikolaynikolayevich4469 2 жыл бұрын
The author is a genius Talk for 20 minutes about what you can say in 5 minutes. This requires talent))
@MitchellPearson
@MitchellPearson 2 жыл бұрын
You made me laugh out loud. I am pretty sure this is not a complement, but I still like it :)
@nlopez2304
@nlopez2304 Жыл бұрын
This is awesome! I've been looking at how to show month average by year for a bit and I can't understand how everything works together. You just explained everything clearly, not just the average but the use of multiple useful combinations that can be applied in complicated calculation. Thanks!!!
@Milhouse77BS
@Milhouse77BS 3 жыл бұрын
Looking forward to see future video regarding SUMMARIZECOLUMNS vs SUMMARIZE in DAX.
@zubair242
@zubair242 2 жыл бұрын
Thank you Mitchell for such an awesome video. I have learnt a lot from your teachings at Pragmatic Works. Your explanations are very easy to understand. You can explain difficult topics very easily.
@MitchellPearson
@MitchellPearson 2 жыл бұрын
Thank you Hafiz, glad to help!
@Alma-im4qk
@Alma-im4qk 10 ай бұрын
Thank you so much. I was struggling with the same problem and you solve it.
@damn68
@damn68 Жыл бұрын
I know I am 2 years behind 😂😂😂. But I want to see everything you touch, because everything you touch turns to golden knowledge. 😂😂 maybe co-pilot vs. Dax video
@alano444
@alano444 3 жыл бұрын
Best Dax video I have ever watched bar none! You are a born educator. Bravo.
@michelleliu1181
@michelleliu1181 Жыл бұрын
Many thanks for this! You have a talent in explaining complex things so well!! Please keep them coming!
@froggyana
@froggyana 2 жыл бұрын
Thanks for this, it helped me reason through a similar challenge I was facing.
@MitchellPearson
@MitchellPearson 2 жыл бұрын
That's awesome, glad it helped.
@martasPD
@martasPD 3 жыл бұрын
Love your style Mitchell!! Thank you so much for these videos & great explanations. Hungry for more :). Greetings from Czech Republic / Europe. Martina
@MitchellPearson
@MitchellPearson 3 жыл бұрын
This is great feedback Martina, thank you so much :)
@khardu
@khardu 3 жыл бұрын
Thank you for another great video Mitchell. I am really fond of your teaching style, the way you lay it out all in a nice and simple way. It sure sticks to the brain. Looking forward to watching more of it.
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Thanks Khardu, glad to help!
@BrianStettenbenz
@BrianStettenbenz 11 ай бұрын
Thank you Mitchell! The best video on KZbin regarding the function.
@dan-is6mc
@dan-is6mc Жыл бұрын
Helped me a lot. Thanks for the video!
@centugurdag7776
@centugurdag7776 Жыл бұрын
it would be great to get the files that you are using within your videos. according to me you are the one of the best in terms of teaching the background of the functions in daX
@cindypayet281
@cindypayet281 Жыл бұрын
Thank you very much, you explain really easily and it's easy to follow you and put into practice. I cannot thank you enough!!!
@kavehyarohi2886
@kavehyarohi2886 2 жыл бұрын
The best when it comes to DAX, thanks Mitchell.
@ceptebayi5385
@ceptebayi5385 Жыл бұрын
Thanks for your great teaching
@patticmcconnell
@patticmcconnell 2 жыл бұрын
This was a great tutorial! You really took time to go through every line of code & explain. Would you ever consider doing an average by week? Again thank you for posting this :)
@jahzielvaldes6948
@jahzielvaldes6948 2 жыл бұрын
Thank you so much for the explanation! This is the best video I´ve ever watch about DAX, thank you again!!
@randyblaschke1031
@randyblaschke1031 9 ай бұрын
Great video and thanks for taking the time to explain everything in detail. I know this video is a couple years old. Is there a way to not return a 3 month average for the first 2 rows where there is not enough previous data to give 3 month average?
@tangben9297
@tangben9297 Жыл бұрын
You're a life saver.. this is exactly what I needed for BI report.. thank you very much Kind Master 😊😊😊
@massimocolaceci
@massimocolaceci 3 жыл бұрын
22' very well spent. Among other things, I appreciated the note on SUMMARIZECOLUMNS interaction of the context. Thanks Mitchell, I just subscribed your channel
@chakrabmonoj
@chakrabmonoj 2 жыл бұрын
Excellent lesson Mitchell...not sure if you have gotten yet to the promised video on the difference between "summarize" and "summarizecolumns"
@kostamadorsky
@kostamadorsky 2 жыл бұрын
One thing to note, that if in the expression for AVERAGEX you use expression (e.g. SUM('Sales'[Price]) ) it will not give you result you expect. It has to be a measure with exactly the same code (Total Sales = SUM('Sales'[Price]) ).
@MitchellPearson
@MitchellPearson 2 жыл бұрын
Very good observation! You are correct, X functions create a row context and since we are iterating over the date table we need to move that row filter into the filter context (Context Transition). Calling the calculated measure forces this transition to occur. We could write out the expression sum of sales amount but we would need to wrap it in a calculate statement like this: calculate(sum(salesamount)).
@kostamadorsky
@kostamadorsky 2 жыл бұрын
@@MitchellPearson thanks for clarification, I understand why that happens now. Had quite a bit of WTF moments while trying to understand why my measure was not working and was always equal to just total SUM.
@vasileiosmanasas4194
@vasileiosmanasas4194 2 жыл бұрын
Thank you for the step by step explanation. Really helpful to understand the logic behind the solution, many thanks.
@jilalumustefa2276
@jilalumustefa2276 Жыл бұрын
I'm follow you in pragmatic work !!! can't wait too subscribed this Chanel # love from Ethiopia
@romanmagic9952
@romanmagic9952 Жыл бұрын
Thank you for the video! If there were no sales in some month, then how to calculate the average value correctly?
@worldofdata
@worldofdata 10 ай бұрын
great explanation, really loved this:)
@608er
@608er 10 ай бұрын
Your explanations are always on point.
@krishj8011
@krishj8011 7 ай бұрын
great tutorial. very useful... thanks.
@mohityadav2162
@mohityadav2162 Жыл бұрын
Such an amazing explanation!! Very very detailed! Loved it!!🎉
@prokocim
@prokocim 3 жыл бұрын
very well explained! I like the way you split the DAX formula into sections
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Thank you Pawel, I'm glad you enjoyed it and found it helpful!
@jaggyjut
@jaggyjut 2 жыл бұрын
Thanks. What instead of total sales, we had to count the number of tickets per month and then average them per year pls?
@mimib9012
@mimib9012 2 жыл бұрын
how to calculate monthly average include months with no record, in a matrix at Year and quarter levels
@shoaibrehman9988
@shoaibrehman9988 2 жыл бұрын
Its a gr8 video, why you are not making more videos
@julliettecarignan8563
@julliettecarignan8563 Жыл бұрын
This was exactly what I needed, you’re great Mitchell!
@Pfreiker
@Pfreiker 2 жыл бұрын
Great video and a really good teaching style, thanks!
@hombreazu1
@hombreazu1 3 жыл бұрын
Well done. Look forward to your other videos.
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Thank you! Glad you enjoyed the video.
@edjabouvincent7369
@edjabouvincent7369 7 ай бұрын
Amazing and fantastic explanation!
@BbabbittGolf
@BbabbittGolf 9 ай бұрын
How can we look at rolling averages over transactions instead of dates?
@johnabram4159
@johnabram4159 2 жыл бұрын
'X' functions are like SUMPRODUCT in Excel, if I am not wrong to put it simply.
@luigisir6893
@luigisir6893 Жыл бұрын
Hi, I congratulate you for the really interesting topic. I would like to ask you a question. How can I apply this formula create with DAX with Excel Power Query that uses M language? Tnx for your reply!
@ahmedharoon2740
@ahmedharoon2740 3 жыл бұрын
great explanations ... thanks for your efforts to help us, to guide us, to teach us :)
@macemalakai
@macemalakai 2 жыл бұрын
Great breakdown, thanks so much! Easy to understand. Thanks again!
@munidulam6212
@munidulam6212 Жыл бұрын
Hi @Mitchell, this is Raj from India. I need to achieve some scenario. Let us assume 5 products were sold in the last month and 2 of them were sold in current month also along with other products. Now, I need to exclude those 2 products and retrieve the count of last month sold products as 3 instead of 5. eg: P1, P2, P3, P4 & P5 were sold in the last month. P1, P2, P6 & P7 were sold in current month. Now I need to get the count of last month sold products but not this month as 3(only P3, P4 & P5 should be counted). Please help me write the DAX measure code on this. Thanks in advance.
@andrewcoventry7246
@andrewcoventry7246 Жыл бұрын
how would this work if one of your months were blank? would the averageX remove the null before the summarize?
@tedbandaru
@tedbandaru 2 жыл бұрын
Can you make a video talking about the differences between SUMMARIZE() and GROUPBY()?
@prudhvireddy6452
@prudhvireddy6452 3 жыл бұрын
Good explanation , please share the practice dataset
@azizquazi
@azizquazi Жыл бұрын
Hi, how to get the PBIX file for this video? Thanks.
@DIGITAL_COOKING
@DIGITAL_COOKING 3 жыл бұрын
Awesome video sir Mitchell, and I think if you do others videos about DAX where you use virtual Tables inside formulas it will be great because in DAX to take further steps after understanding evaluation context is to know how to create measure with using virtual tables. after all it's great what you do sir! thanks
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Thanks for watching and I'm glad you found this video helpful!
@garylbrown4
@garylbrown4 3 жыл бұрын
Excellent teaching style and awesome video.
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Glad you liked it! Thanks!
@VIJAY-pd4jt
@VIJAY-pd4jt Жыл бұрын
Great Sir. Thanx a lot
@phamluu9079
@phamluu9079 3 жыл бұрын
This tips is really well
@mwangikaigi6152
@mwangikaigi6152 3 жыл бұрын
Thanks Man. You made me understand filter and Row context!
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Hey Mwangi, thanks for the feedback. I'm glad the video helped!
@pepper_lab
@pepper_lab Жыл бұрын
Please come back here.... where are you
@DanielWeikert
@DanielWeikert 3 жыл бұрын
Hi Thanks for your videos. I would like to ask a question if I may. I would be interested in how RLS works with SSAS live connection and import mode. Is there a chance you can address this topic in a video? best regards and stay safe
@jazzista1967
@jazzista1967 3 жыл бұрын
MItchell... great video... Qucik question, how would do you obtain the rolling average? Do you change the daysinperiod to -12months? Thanks
@williamarthur4801
@williamarthur4801 Жыл бұрын
Hi, I know you mentioned values at the beginning, but is there any advantage to using Summarize? I would just have used AVERAGEX( VALUES( Calendar [ MMM-YYYY] ) , [Total Sales] ) , I find Summarize a bit hard, but have found it useful in reducing the rows of a table that need to be iterated over, so in a a total sales iterate over the sales table summarized by the dim product , customer etc.
@BbabbittGolf
@BbabbittGolf 9 ай бұрын
You are the GOAT!!!
@arbaskar69
@arbaskar69 Жыл бұрын
Hi Mitchell - Is there old videos have been deleted?
@williamstan1780
@williamstan1780 3 жыл бұрын
I would like to have a video clip about totalmtd, totalqtd and TOTALYTD. I always have a problem with totalmtd and totalqtd. It appears that it is related to the date table is end on the 31st Dec 2021 while I am working on the mtd for Aug... Wonder how to solve the problem
@angelnavarro503
@angelnavarro503 3 жыл бұрын
Hey thanks for the explanation, how do the same with an id column instead of date as you did it with datesinperoid i want to have an average of the last 3 previous values using my id column that is unique in my table and is consecutive like an index column
@majiddini531
@majiddini531 2 жыл бұрын
Hi Mitchell, thanks for the nice Video, just was wondering how can we calculate the moving average for series of data in sequence of one minute or 5 minute, e.g. for a day have 1440 rows, appreciate your help.
@selenevera8834
@selenevera8834 2 жыл бұрын
Great video! Thxs ; )
@kennethstephani692
@kennethstephani692 2 жыл бұрын
Terrific video!!
@fatihkokceoglu9438
@fatihkokceoglu9438 2 жыл бұрын
You rock sir👍
@bhakthasingh8198
@bhakthasingh8198 3 жыл бұрын
Excellent!
@sarris2412
@sarris2412 3 жыл бұрын
Great demo...thank you
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Thanks for watching!
@techwithramsey
@techwithramsey 3 жыл бұрын
This was a great explanation 👏
@allenray9526
@allenray9526 3 жыл бұрын
Not sure if you guys gives a damn but if you guys are bored like me during the covid times you can watch all the new series on instaflixxer. Have been binge watching with my girlfriend for the last couple of months :)
@rayangrayson7769
@rayangrayson7769 3 жыл бұрын
@Allen Ray yea, been using InstaFlixxer for since december myself :)
@mohammadrezaei4221
@mohammadrezaei4221 3 жыл бұрын
Excellent,Thanks
@MitchellPearson
@MitchellPearson 3 жыл бұрын
Thank you too!
@zzzzzzzzzzzzzzzz9
@zzzzzzzzzzzzzzzz9 3 жыл бұрын
Nice video as always. I'm struggling with time and date functions. I'll email you a scenario if that's ok? What would be the best way to contact you
@MitchellPearson
@MitchellPearson 3 жыл бұрын
mpearson@pragmaticworks.com
@fuzzy889
@fuzzy889 3 жыл бұрын
Does not work for me.
Understanding Row Context in DAX using Power BI
19:47
Pragmatic Works
Рет қаралды 42 М.
Differences between GROUPBY and SUMMARIZE
28:30
SQLBI
Рет қаралды 37 М.
Magic trick 🪄😁
00:13
Andrey Grechka
Рет қаралды 68 МЛН
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 78 МЛН
Calculate a Rolling Average in Power BI Using DAX
11:00
Essential Excel
Рет қаралды 56 М.
Row Context in DAX
20:42
SQLBI
Рет қаралды 98 М.
Computing rolling average in DAX
16:43
SQLBI
Рет қаралды 72 М.
Context Transition in Power BI and Tricky Examples
15:06
Goodly
Рет қаралды 42 М.
Use CONCATENATEX to Create Smart Visuals in Power BI
20:02
How to create a ROLLING AVERAGE in Power BI by Using DAX [2021]
29:43
Nestor Adrianzen
Рет қаралды 10 М.
Magic trick 🪄😁
00:13
Andrey Grechka
Рет қаралды 68 МЛН