Window functions are easy if you've done some SQL before. Otherwise, think of it like Excel Absolute and relative reference when calculating cummulative total like SUM($A$1:A2). The major catch being the PartitionBy which revs the power up by more than 100 😅.
Thank you for this tutorial, but could explain why with me it works differently ? : Highest Selling Month by Year = MAXX( WINDOW( 1, ABS, // start of the window -1, ABS, // end of the window SUMMARIZE(ALLSELECTED('Maven Cycles Calendar'), 'Maven Cycles Calendar'[Year], 'Maven Cycles Calendar'[Month Number]), , , PARTITIONBY('Maven Cycles Calendar'[Year]) ), [Total Quantity] ) returns the exact same value that Total Quantity" column (Start of Month row - e.g. "January 2015, February 2025....")
Window = MAXX( WINDOW( 1,ABS,-1,ABS, SUMMARIZE( ALL('Calendar'),'Calendar'[Month_Name],'Calendar'[Year_ID] ) ,,,PARTITIONBY('Calendar'[Year_ID])), [Customer Sales] ) This is not working for me. Can you please check if dax is right or not?
month name should be sorted by month number. include that under SUMMARIZE(ALLSELECTED('Calendar'),Calendar'[Year_ID], 'Calendar'[Month_Name], 'Calendar'[Month_Nmber] )
Window functions are easy if you've done some SQL before. Otherwise, think of it like Excel Absolute and relative reference when calculating cummulative total like SUM($A$1:A2).
The major catch being the PartitionBy which revs the power up by more than 100 😅.
Excellent explanation!
Thanks for simplify way to understanding windows function 😊
Thanks for this scenario based window function
Great content
The absolute and relative is like the $ in excel, when you “drag” a window. That’s how I “framed” it in my mind
That helped me, Thanks
Thank you 👍🏻👍🏻👍🏻👍🏻
Thank you for this tutorial, but could explain why with me it works differently ? :
Highest Selling Month by Year =
MAXX(
WINDOW(
1, ABS, // start of the window
-1, ABS, // end of the window
SUMMARIZE(ALLSELECTED('Maven Cycles Calendar'), 'Maven Cycles Calendar'[Year], 'Maven Cycles Calendar'[Month Number]), , ,
PARTITIONBY('Maven Cycles Calendar'[Year])
),
[Total Quantity]
)
returns the exact same value that Total Quantity" column (Start of Month row - e.g. "January 2015, February 2025....")
Window = MAXX(
WINDOW( 1,ABS,-1,ABS,
SUMMARIZE(
ALL('Calendar'),'Calendar'[Month_Name],'Calendar'[Year_ID]
)
,,,PARTITIONBY('Calendar'[Year_ID])),
[Customer Sales]
)
This is not working for me. Can you please check if dax is right or not?
month name should be sorted by month number. include that under SUMMARIZE(ALLSELECTED('Calendar'),Calendar'[Year_ID], 'Calendar'[Month_Name], 'Calendar'[Month_Nmber] )
'promo sm' 😡