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
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!
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 |
---|---|
42 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
39 | |
33 | |
18 | |
17 |