Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
So I thought I had this solved but i don't 😞 I need 4 week trailing average of the number of orders. Below you can see the graph I am trying to create . The formula below looks like it works but its giving me the current week - 3 previous weeks average. If I change the -3 to -4 I get very different numbers as well.
Solved! Go to Solution.
@BabyBinki821 , If you do not want this week
Measure = calculate(AVERAGEX(values('DATE'[Week Rank]),Orders[Total Orders]),filter(all('DATE'),'DATE'[Week Rank]>=max('DATE'[Week Rank])-4 &&'DATE'[Week Rank]<=max('DATE'[Week Rank])-1 ))
or
Measure = calculate(AVERAGEX(values('DATE'[Week Rank]),Orders[Total Orders]),filter(all('DATE'),'DATE'[Week Rank]>=max('DATE'[Week Rank])-5 &&'DATE'[Week Rank]<=max('DATE'[Week Rank])-1 ))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
@BabyBinki821 , If you do not want this week
Measure = calculate(AVERAGEX(values('DATE'[Week Rank]),Orders[Total Orders]),filter(all('DATE'),'DATE'[Week Rank]>=max('DATE'[Week Rank])-4 &&'DATE'[Week Rank]<=max('DATE'[Week Rank])-1 ))
or
Measure = calculate(AVERAGEX(values('DATE'[Week Rank]),Orders[Total Orders]),filter(all('DATE'),'DATE'[Week Rank]>=max('DATE'[Week Rank])-5 &&'DATE'[Week Rank]<=max('DATE'[Week Rank])-1 ))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thank you!!! It worked!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
7 | |
6 | |
5 |
User | Count |
---|---|
20 | |
11 | |
10 | |
9 | |
6 |