DAX Fridays! #40: DATESINPERIOD (Moving x Months average)

DAX Fridays! #40: DATESINPERIOD (Moving x Months average)

Curbal

7 лет назад

31,239 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@martynepoffpoff
@martynepoffpoff - 30.10.2023 16:21

Thank you, very helpfull video. I am trying to calculate rolling average of already calculated meassure, but average function does not work neither averagex. Coul you please suggest how to solve it?

Ответить
@feng3625
@feng3625 - 19.04.2023 05:32

How about I want to get last 3 months not including current months

Ответить
@lewinmg
@lewinmg - 09.12.2022 18:20

i'll be honestl, this video makes absolutely no sense. I'll ignore that fact that you used the "last date" for the "start date". lets just say thats how it works, but you were supposed to be showing a moving average of last 3 months, but you proceeded to show us a moving average of just days. this whole example is in one month (July). how is this a moving average for last 3 months?

Ответить
@AnoopKumar-rf1zn
@AnoopKumar-rf1zn - 11.08.2022 09:38

Good video. how can we calculate the rolling average of 10 days? when we have data of discontinuous
date. It would be great if you make a video on it.

Ответить
@chakrabmonoj
@chakrabmonoj - 10.04.2022 07:05

Curbal - I love your videos for someone like me, who is starting out on using DAX, these videos are lifesavers.
I will have to trouble you with a question though : what is the difference datesbetween and datesinperiod?

Ответить
@kirtivaghela877
@kirtivaghela877 - 07.01.2022 16:58

Great helpful easy to follow and understand - thank you. I am trying to calculate Bradford factor - please can you advise how to count consecutive days of sickness as single episode. For example if person is off sick from from 5th July 21 to 8th July 21 then this should be = 1 episode and if same person is off sick is 6th Dec 21 to 9 Dec 21 this should equal to 1 episode, so total no of episodes = 2. thanks. I would greatly appreciate help

Ответить
@peterhui2452
@peterhui2452 - 03.09.2021 00:24

You are amazing Ruth!

Ответить
@bradj229
@bradj229 - 23.08.2021 01:05

Thanks Ruth! This was a little confusing (visually), but I understood it after a couple of reviews.

Ответить
@aimantabreez9439
@aimantabreez9439 - 07.08.2021 19:51

Why we use the last date function when we want from the first date to that is from 1996 in this scenario!

Ответить
@Tanya-og7no
@Tanya-og7no - 26.07.2021 14:56

Do we need a date table / calendar as a separate table to implement DatesinPeriod?

Ответить
@mannarmannan65
@mannarmannan65 - 01.07.2021 08:56

Hi Ruth. Thanks. This works well if I have a date filter chosen for a particular month and year.. But i have a date slicer which is a range. For this the measure is always zero. Can you help please.

Ответить
@juandavidangell.5312
@juandavidangell.5312 - 25.04.2021 15:50

Hello ! Why do you use last date dax to indicate the start date un the fórmula? Very good video

Ответить
@deepakverma7636
@deepakverma7636 - 24.04.2021 19:25

Why you have taken the 'lastdate' as an argument? Can you explain?

Ответить
@olcia2467
@olcia2467 - 08.02.2021 14:56

Hi regerarding your video i have a task to calcualte moving average. It works fine when i put it on the chart. But when i filter the data on the chart it does not tak innto accout in calcupations earlier dates so the average is not correct. Canyou help?

Ответить
@growwmore1205
@growwmore1205 - 15.01.2021 19:52

powerbi file is not available in the download centre. Can you please check.

Ответить
@nikhargesumit9069
@nikhargesumit9069 - 14.11.2020 10:36

Thanks Curbal for this video. In same method can you suggest how to calculate moving average count (example count of Customer ID).

Ответить
@mandarvv
@mandarvv - 26.10.2020 11:24

Can we make it parameterized??

Ответить
@solimar81
@solimar81 - 16.08.2020 01:37

I see you put in MONTH interval, but in the report, it seems to be taking the daily average?

Ответить
@Graylinepartners
@Graylinepartners - 29.03.2020 10:03

Very helpful. Thank you for being so comprehensive. I appreciate the granularity.

Ответить
@mubeenxp8502
@mubeenxp8502 - 23.02.2020 19:46

Good

Ответить
@myleshuet7999
@myleshuet7999 - 14.01.2020 23:48

Good video. I understand the logic but I’m having issues replicating this using COUNTROWS. I want the 1 week and 4 week rolling averages but have yet to get the correct result. I don’t have a particular column to sum, but I need to know the amount of records in a given period.

Ответить
@sandyarani936
@sandyarani936 - 20.08.2019 16:29

Hi Ruth, thank you for your amazing videos, but in this video I can't understand one thing. You went for creating a formula for monthly average and you are going day by day moving average. If I see your video correctly it focus on 8th Jul, 12th July instead of May, June and July month sales data moving average. May I know the reason if you kindly explain?

Ответить
@stevennye5075
@stevennye5075 - 07.02.2019 21:51

excellent

Ответить
@anjutamang2542
@anjutamang2542 - 28.01.2019 13:15

my total sales are big and in dollar while yours is small number. do we have to calculate average tot sales separately to do the moving average ? i am using the same data set

Ответить
@denysss5872
@denysss5872 - 25.11.2018 16:52

Hello! What is faster: Calculate or Aversgex in this case?

Ответить
@leonardofolina6786
@leonardofolina6786 - 16.11.2018 01:49

I want to calculate the total sales last week. How can i do that?.

Ответить
@aks541
@aks541 - 06.11.2018 10:56

My bad I can't understand one thing. You went for creating a formula for monthly average and you are going day by day moving average. If I see your video correctly it focus on 8th Jul, 12th July instead of May, June and July month sales data moving average. May I know the reason if you kindly explain?

Ответить
@FaiyazKhairaz-Aonlinetraining
@FaiyazKhairaz-Aonlinetraining - 28.06.2018 08:53

Hi,

We need a table, which will have all the dates from Jan 2018 ( and -1 year )
Which would be Jan 2017 - jan 2018

With all the dates and the sales amount next to each date.
example:

1-1-17 | 10,000
1-2-17 | 20,000
2-2-17 | 20,000
2-10-17 | 20,000
2-12-17 | 20,000
1-1-18 | 30,000

We used this
calInPeriod
=Calculate(SUM(FactSales[SalesAmount]],DatesInPeriod(date[fullDate],date(2007,01,01),-1,year)

But, does not work
Thanks

Ответить
@peterg4130
@peterg4130 - 23.06.2018 15:39

Would this work with a SUM function instead of AVERAGE? I am not at work right now so I can't check...

Ответить
@fionamehta7381
@fionamehta7381 - 24.04.2018 19:43

Many thanks!

Ответить
@martinmejia197
@martinmejia197 - 19.03.2018 22:14

Hi Ruth! Another great video... Thanks! My understanding here is that, in the Power BI example you are presenting, you are obtaining the daily moving average for the last 12 months, correct? What about if you want to get the monthly moving average for the last 12 moths based? The daily sales would need to be summed to obtain the monthly total and then get the monthly moving average, right?

Ответить
@YoUzHi90
@YoUzHi90 - 18.10.2017 11:30

Hi Ruth, would this formula work if i replace Average (Sales) to Distinct count of the dimensions (lets say customer)? I need to see Running 3 months Distinct count by customer. Appreciate if you can help!

Ответить
@orxanbabashov
@orxanbabashov - 13.10.2017 02:56

Thanks so much for such informative videos.Your videos are my reference point:))

Ответить
@kirankumari1985
@kirankumari1985 - 11.08.2017 00:47

Hi Ruth, It's a really good video! The column I am trying to get average is not the total value of the item. It's a FIFO layer value (each item has multiple layers of value). The average formula only works on a column of a table (not measure). Is there any way I can nest sum column? example : = calculate(average(sum(FIFO_table,[total item value]) DATESINPERIOD(DimDate[Date], LASTDATE(DimDate[Date]),-30, day))

Ответить
@rrrprogram8667
@rrrprogram8667 - 13.07.2017 11:18

Why don't you do one complete real time business intelligence application....... which would cover most of the functions... It will be a great learning for us.

Ответить
@rrrprogram8667
@rrrprogram8667 - 13.07.2017 11:16

Hi.... Nice one ... I didn't knew that bell thing :D

Ответить
@mathijs9365
@mathijs9365 - 06.06.2017 19:35

Thanks. Keep the videos coming!

Ответить
@automationguide3498
@automationguide3498 - 05.06.2017 19:21

Thank You Ruth !!!

Ответить
@CloudhoundCoUk
@CloudhoundCoUk - 04.06.2017 11:05

Really cool.

Links do not appear to work as you rightly state probably a browser issue.

Ответить
@williampetit3234
@williampetit3234 - 03.06.2017 17:43

Hi Ruth,nice work again,tried your survey link in IE and Chrome but both returned errors... sorry.Great work, really helps me in my work! ps and great fun!!!Will

Ответить
@markdawson8876
@markdawson8876 - 03.06.2017 10:12

Good session again Ruth , is The demonstration Colin Taylor showed on your live session going to produce a another video as it looked very interesting but as you know it was hard to follow.
Have a great weekend :-)

Ответить
@rajan77
@rajan77 - 03.06.2017 09:10

Thank You Very Much! Can you please make a video to calculate distance between two Zip-codes.

Ответить
@SmartBimson
@SmartBimson - 02.06.2017 23:50

Hey Ruth ! Another cool video, thanks so much ... it's always fun for,me to start the Saturday then with redoing what you explained on Dax Friday ;-) 🙋🏼‍♂️👍🏻🌞 have a Great Weekend 😎🍹🎉💃🏻

Ответить
@Victor-ol1lo
@Victor-ol1lo - 02.06.2017 21:54

Great video !!! Thumbs Up !!!

Ответить
@excelisfun
@excelisfun - 02.06.2017 20:26

Thanks for the DatesInPeriod fun : )

Ответить
@MrNillock
@MrNillock - 02.06.2017 17:00

as always awesome video. just so you know the survey link does not work for me either... using Chrome i get the following error : {"error":{"code":"generalException","message":"General Exception While Processing"}}

Ответить
@jazzista1967
@jazzista1967 - 02.06.2017 16:35

Hi Ruth : Great video..... thanks for the moving average refresher!

Ответить
@nancysapra5555
@nancysapra5555 - 02.06.2017 16:06

very helpful ma'am... thanks :)

Ответить