The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |