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.
Can anyone spot what the issue is? I'm trying to calculate a trailing 12 month average. Here are the pieces involved. I will be more than happy to clarify anything because I've been stuck on this for weeks:
Count of survey results considered "positive":
Count of all survey results (positive, neutral, negative)
Percentage of positive feedback:
Attempt at calculating trailing 12 month average:
Results:
The results should definitely not be 100% for every month...
Solved! Go to Solution.
I've done something similar using different DAX (syntax may be a bit off)
You could put an offset column in your date table with inactive relationship:
Offset Month = DATE('Calendar'[SOM].[Year]-1,'Calendar'[SOM].[MonthNo],'Calendar'[SOM].[Day])
Then:
Trailing 12 Month Average = SUMX('All Survey Data',CALCULATE(SUM('All Survey Data'[Positive Feedback]),
FILTER('All Survey Data','All Survey Data'[Start Date]<=CALCULATE(MIN('Calendar'[Start Date]))&&'All Survey Data'[Start Date]>=MAX('Calendar'[Offset Month]))) / [All Groups]
Could you put the other measures in that table as well to see if they're calculating correctly?
I've done something similar using different DAX (syntax may be a bit off)
You could put an offset column in your date table with inactive relationship:
Offset Month = DATE('Calendar'[SOM].[Year]-1,'Calendar'[SOM].[MonthNo],'Calendar'[SOM].[Day])
Then:
Trailing 12 Month Average = SUMX('All Survey Data',CALCULATE(SUM('All Survey Data'[Positive Feedback]),
FILTER('All Survey Data','All Survey Data'[Start Date]<=CALCULATE(MIN('Calendar'[Start Date]))&&'All Survey Data'[Start Date]>=MAX('Calendar'[Offset Month]))) / [All Groups]
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 |
---|---|
106 | |
96 | |
79 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |