Тёмный

Calculate a Rolling Average in Power BI Using DAX 

Подписаться
Просмотров 55 тыс.
% 625

👉 Join members: ru-vid.com/show-UCeX5SphLC0ky7rpbsffFwqgjoin
In this video we demonstrate how to calculate a rolling average in power bi using DAX. In this example we look at a rolling 7 day average, but our formulas can easily be updated to reflect a period of your choice.
If you have any questions please drop me a comment below and I will respond soon as possible!
Also don't forget to LIKE and SUBSCRIBE!!
Instructor Lead Excel Course ► essentialexceluk.com/products/master-excel-course
VBA Playlist ► essentialexceluk.com/blogs/tutorials/tagged/vba
More Tutorials ► essentialexceluk.com/blogs/tutorials
#powerbi #dax #average #rollingaverage #powerbitraining #tutorial #office365

Опубликовано:

 

2 янв 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 45   
@EssentialExcel
@EssentialExcel 3 года назад
I hope you enjoyed this tutorial 😃 If you did please give it a LIKE... and don’t forget to SUBSCRIBE for even more content! For More 👉 ru-vid.com
@DanielRoberts1984
@DanielRoberts1984 2 года назад
You get a subscription for this! Exactly what I needed minus the fluff that I have found in other tutorials. Excellent stuff!
@jayxpea
@jayxpea Год назад
This is great, easy to understand, simple and concise 👍👍
@kevinlabore1726
@kevinlabore1726 Год назад
Thank you -- good example!
@ubonguttah
@ubonguttah 2 года назад
Thanks for sharing . Amazing
@AndrewJohnClive
@AndrewJohnClive 2 года назад
Thank you!🙏🏻
@samerbabikir8946
@samerbabikir8946 3 года назад
Amazing 👏
@jonschinker5976
@jonschinker5976 2 года назад
Thank you!
@alishaaiden8617
@alishaaiden8617 2 года назад
thx saved me!
@mariomdssaldanha5353
@mariomdssaldanha5353 Год назад
Thank You So much for the insight given to us through your tube channel. 🙏
@EssentialExcel
@EssentialExcel Год назад
Glad they are helpful! Thank you Mariomds 🙂
@navitaw8876
@navitaw8876 2 года назад
Thank you so much!!! 😃
@EssentialExcel
@EssentialExcel 2 года назад
Thank you!
@BakhosChedid-kw8co
@BakhosChedid-kw8co Год назад
Thank you for that 👍
@EssentialExcel
@EssentialExcel Год назад
Welcome Bakhos 🙂
@dhirajhadkar6413
@dhirajhadkar6413 3 года назад
How do i do rolling avg of months. while the month rage will be selected from slicer So i select july 2020 to date and i get rolling avg of amount
@jyotidatta2126
@jyotidatta2126 3 года назад
How can I keep the rolling average for 1st entry the same as 'Amount' and then start calculating the average for the second entry as Rolling sum/2, for third entry as rolling sum/3 and so on....
@lmfaoremix
@lmfaoremix 2 года назад
in this example if i want to exclude the weekends how can i do?
@ibrahimalhumaid539
@ibrahimalhumaid539 Год назад
thanks 👍
@EssentialExcel
@EssentialExcel Год назад
Thank you 🙂
@ysteinbjarky5284
@ysteinbjarky5284 3 года назад
Are you also able to calculate the correct amount the first 7 or 28 days?
@swathikota
@swathikota 6 месяцев назад
Hey!! The solution and approach looks great! But the drawback of this approach is this would not give proper average if the dates aren't continuous i.e. if the sales data for a few days are missing in the data. The formula would sum up properly until 7 days, but you cannot divide this sum by 7 as the number of entries considered are not 7 in case of missing data.
@millar2255
@millar2255 6 месяцев назад
Trying to calculate the 12 month rolling average for a rate (Measure). It doesn't seem to be working and is just returning the same value as the current month's value (not the average of the last 12 months).
@Koreafut02
@Koreafut02 2 года назад
How would I do a rolling 7 days Calculation if I were to combine it with a Filter formula? For example Measure Name = VAR NumDays = 7 VAR RollingCOUNT = CALCULATE( COUNT ( 'table'[ColumnName],FILTER(table,'table'[column]="Value") DATESINPERIOD( table[Date],LASTDATE(table[Date]),-Numdays,DAY) ) RETURN RollingSum
@ukaszlachmider5961
@ukaszlachmider5961 Год назад
I was struggling to achieve the same result by experimenting with AVERAGEX... It's brilliant how a simple divide by RollingPeriod helped! Many thanks! Subscribed!
@EssentialExcel
@EssentialExcel Год назад
Thank you Lukasz! Glad it gave you the answer to your problem! 😃
@HideDeepInBlue
@HideDeepInBlue Год назад
It's a great video. My question is whether I can calculate the trailing average for the Measure I created.
@EssentialExcel
@EssentialExcel Год назад
Hi Miao 👋 technically yes, you could structure a new measure using this measure as the input.
@mjwj88
@mjwj88 3 года назад
I wish you would zoom in on the formula ... it's super blurry on my view and very difficult to read the text in the rolling average measure.
@peterg4130
@peterg4130 2 года назад
I'm trying to do this but with number of visits my field team does. Instead of "Sum[Total Sales]" I do "DistinctCount[VisitID]" but when I drop the Moving Average measure into my line chart, it looks exactly the same as if I would drop the [VisitID] column into it. No average is being calculated. It just shows the daily visits. What am I missing?
@DrewPyke
@DrewPyke 2 года назад
Same
@sonustar9077
@sonustar9077 Год назад
It's because of distinctcount the ID is only counted one time in the period cause the ID is unique.
@Animusvolaticus
@Animusvolaticus 3 года назад
I don’t seem to fully understand how LASTDATE works in this formula. I know LASTDATE returns a table with one row and colum of the last date of the specified column date. I’m this example the last date is July 23rd. The calculate function will run whatever function we specified for each row. So how is it the each row isn’t just based on July 23rd? Or is it the LASTDATE is based on the last date for the specific row it’s evaluating at a specific point in time. So when it’s evaluating row 1, the Last date is July 1 bc it hasn’t evaluated the rest. So row 2 the last date is July 2 bc between row 1 and 2 that’s the oldest date and so on until it get to the last row. Any clarification would be appreciated.
@kebincui
@kebincui 2 года назад
have the same query. I am wondering if you have this clarified. Thanks
@Animusvolaticus
@Animusvolaticus 2 года назад
@@kebincui haven’t clarified this yet, sorry :s
@sonustar9077
@sonustar9077 Год назад
You pretty much answered your own question. The second part of your comment describes exactly how last date works it always depends on the row context unless you specify it in the calculate filter statement(like all (calender) or remove filters.
@kebincui
@kebincui Год назад
@@sonustar9077 hi Sonu. Thanks for your explantion on this. Since the Lastdate function is evaluated on each row context and is basically a date picker for each row, in that sense Lastdate and Firstdate does not make difference. So we can change the LASTDATE function to FIRSTDATE function in the dateinperion expression and this will not affect the result. Is that correct? Thanks for your further check and confirmation.
@celtspeaksgoth7251
@celtspeaksgoth7251 Год назад
Great, no unnecessary jazz and an accent which neither grates nor is difficult to understand. Also that conversion from pesky default date hierarchy -> flat date at 1:52, I honestly didn't know that and I've produced dozens of reports.
@EssentialExcel
@EssentialExcel Год назад
Thank you and glad you enjoyed the video! 😃
@williamarthur4801
@williamarthur4801 Год назад
This works fine between dates, but I don't see how it would work if you just wanted a cumulative average.
@harisk.1466
@harisk.1466 11 месяцев назад
Just curious why you are using the CALCULATE function given that you are not using any FILTER! at time stamp 05:40
@EssentialExcel
@EssentialExcel 11 месяцев назад
Hello 👋. Not sure I follow your question as this is when we enter our filter criteria using DATESINPERIOD?
@harisk.1466
@harisk.1466 11 месяцев назад
Sorry! At time stamp 04:25 - you are using the CALCULATE function and inside it you are calculating the SUM of the past seven days amount. So, my question is, you are doing just normal SUM here then what is the purpose of using the CALCULATE function here?@@EssentialExcel