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 again
I am trying to have a chart which shows average monthly values but unable to get the average values working. I have tried some dax from other posts on this forum but they haven't helped me unfortunatley.
My approach has been to calculate the number of values by month, and then calculate an average using these monthly values.
For the monthly values i did a calculated column as the following however what this did is give me values which are not the average. (eg January shows 1250 in the image below)
Monthly Totals = CALCULATE(SUM('LB Incident'[Rec Count]),ALLEXCEPT('LB Incident','LB Incident'[Month]))
Average Monthly Launches = AVERAGEX(VALUES('LB Incident'[Month]),[Record Count])
You will see i have two ways of counting numbers of records. [Rec Count] which is a calulated column and [Record Count] which is a measure. This was because for the monthly totals i had to use a column to reference. At this point was getting a bit lost, hence here!
Solved! Go to Solution.
Hi rogerdea,
I am not clear about your requirement, did you want to get result like below?
If so , you could try to use below measure
avg month = CALCULATE ( AVERAGE ( 'LB Incident'[Rec count] ), FILTER ( ALL ( 'LB Incident' ), 'LB Incident'[Month] = MIN ( 'LB Incident'[Month] ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi rogerdea,
I am not clear about your requirement, did you want to get result like below?
If so , you could try to use below measure
avg month = CALCULATE ( AVERAGE ( 'LB Incident'[Rec count] ), FILTER ( ALL ( 'LB Incident' ), 'LB Incident'[Month] = MIN ( 'LB Incident'[Month] ) ) )
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks so much Zoe, thats exactly what i want. I have not got it working yet though, my averages are all "1", but this may be because of the field I am using in the calculation, so will have look today and see if it works. I'll let you know!
Hi rogerdea,
Did this help you solve your issue? If so and if you'd like to, you could mark corresponding post as answer or share your solutions. That way, people who in this forum and have similar issue will benefit from it.
Thanks for your understanding and support.
Best Regards,
Zoe Zhi
The solution work perfectly with my test data so have accepted it. It's just i can't get my real life case working. I think it's a data issue though so hope to figure it out soon!
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 |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |