Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I have a similar problem to the following:
The biggest difference that I could not figure out, is that i want the average to be for every value before the current row (whereas in the above example, it is for a 30-day timeframe).
Thank you
Solved! Go to Solution.
@aar0n ,
You need to add an index column and then create a calculate column using DAX like pattern below:
AverageCol =
CALCULATE (
AVERAGE ( TableA[SALES] ),
FILTER (
TableA,
TableA[SKU] = EARLIER ( TableA[SKU] )
&& TableA[Index] <= EARLIER ( TableA[Index] )
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@aar0n ,
You need to add an index column and then create a calculate column using DAX like pattern below:
AverageCol =
CALCULATE (
AVERAGE ( TableA[SALES] ),
FILTER (
TableA,
TableA[SKU] = EARLIER ( TableA[SKU] )
&& TableA[Index] <= EARLIER ( TableA[Index] )
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
95 | |
82 | |
71 | |
64 |
User | Count |
---|---|
116 | |
106 | |
94 | |
79 | |
72 |