Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Guys,
Could you help me configure this? I'm trying to display the rolling 3-month period using the following DAX code.
I’d like the output to look like this.
Solved! Go to Solution.
Hi,
One of ways is to use WINDOW DAX Function in calculated table formula.
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
Calculated Column expected result =
VAR _t =
WINDOW (
-2,
REL,
0,
REL,
test,
ORDERBY ( test[date], ASC ),
,
,
MATCHBY ( test[date] )
)
VAR _condition =
COUNTROWS ( _t ) = 3
RETURN
IF ( _condition, AVERAGEX ( _t, test[value] ) )
Hi,
One of ways is to use WINDOW DAX Function in calculated table formula.
Please check the below picture and the attached pbix file.
WINDOW function (DAX) - DAX | Microsoft Learn
Calculated Column expected result =
VAR _t =
WINDOW (
-2,
REL,
0,
REL,
test,
ORDERBY ( test[date], ASC ),
,
,
MATCHBY ( test[date] )
)
VAR _condition =
COUNTROWS ( _t ) = 3
RETURN
IF ( _condition, AVERAGEX ( _t, test[value] ) )
Thanks! I'm trying to incorporate the code into a measure within my actual dataset, but it doesn't seem to be functioning properly.
Actual dataset
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |