Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hey PBI experts! 😄
I'm trying to have a 4 week rolling average of CS qty but couldn't find solutions yet. There are many related articles but the advices don't work out for me. I think it's because the data doesn't have any actual dates.
All I need is a column that shows the average of the previous 4 weeks. Could you please advice? Thanks a lot!
Input data
@amitchandak @lbendlin @SpartaBI @tamerj1 @ray_ux
Solved! Go to Solution.
Hello Again @Junminkim0214
This is the running average per Matrial
=
VAR CurrentWeek = TableName[Calendar Week]
VAR StartWeek = CurrentWeek - 4
RETURN
CALCULATE (
AVERAGE ( TableName[CS Qty] ),
TableName[Calendar Week] <= CurrentWeek,
TableName[Calendar Week] > StartWeek,
ALLEXCEPT ( TableName, TableName[Material] )
)
Hi @Junminkim0214 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Again @Junminkim0214
This is the running average per Matrial
=
VAR CurrentWeek = TableName[Calendar Week]
VAR StartWeek = CurrentWeek - 4
RETURN
CALCULATE (
AVERAGE ( TableName[CS Qty] ),
TableName[Calendar Week] <= CurrentWeek,
TableName[Calendar Week] > StartWeek,
ALLEXCEPT ( TableName, TableName[Material] )
)
Hi @Junminkim0214
Do you want that per material, per customer or per both customer and material?
User | Count |
---|---|
107 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |