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.
I am tracking passing scores over time. The data comes in randomly throughout the month.
So I have to divide the current months count of passing grades by the count of last months passing grades. This should come out to a monthly bar graph showing the "Sustainment" Percentage.
Here is some example data:
1-Jan | 72 |
7-Jan | 80 |
13-Jan | 84 |
30-Jan | 52 |
3-Feb | 75 |
4-Feb | 82 |
16-Feb | 86 |
20-Feb | 86 |
25-Feb | 88 |
1-Mar | 70 |
4-Mar | 82 |
6-Mar | 88 |
19-Mar | 84 |
21-Mar | 75 |
My problem is that measures filter on monthly graphs very distinctly, and I'm having problems referencing the previous months. The best I hav ever gotten was showing the current month versus the previous month, but no showing any other months. Sadly, i don't have those measures anymore, but I do have what the graph should look. Granted this is a different graph entirely and not this specific data set.
Thanks for the help.
Solved! Go to Solution.
pls check if this is what you want
create a date table and create measures
pls see the attachment below
Proud to be a Super User!
Thanks for the reply from @ryan_mayu , please allow me to provide another insight:
1. Create a calculated column
Month = MONTH([Date])
2. Create several measures as follow
current = CALCULATE(COUNT('Table'[grades]), ALL('Table'), 'Table'[grades] >= 60, 'Table'[Month] = MAX([Month]))
Max =
VAR _maxMonth = MAXX(ALL('Table'), [Month])
VAR _max = CALCULATE(COUNT('Table'[grades]), ALL('Table'), 'Table'[grades] >= 60, 'Table'[Month] = _maxMonth)
RETURN
_max
divide = DIVIDE([Max], [current])
Result:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is correct, but only partly. I might be able to make it the rest of the way given this, but your data is offset by a month. Given three months of data you shouldnt be able to calculate 1 month. Its:
'This Months passing grades' / ' Last months passing grades'
Given this, January should have no data. Your solution calculates as a month versus next month, and because of this, Assigns a 100% to the most recent month
The output in the real data. Given my data runs Feb-April not Jan-March
pls check if this is what you want
create a date table and create measures
pls see the attachment below
Proud to be a Super User!
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 |
---|---|
109 | |
101 | |
86 | |
77 | |
69 |
User | Count |
---|---|
120 | |
108 | |
98 | |
83 | |
77 |