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,
I want to calculate the Monthly Average cost per year.
Currently I have the below :
Monthly Average Cost = Divide(sumx('Table','Table[Cost]), distinctcount('Calendar'[Month])).
This measure is working. I have however a visual on that page and if you select a speific month, the Monthly Average Cost provides the total cost of that month and divides it by the months in that year. What I would like to see is the Monthly Average of that selected year(s).
@YBZ,
Try these measures:
Total Cost = SUM ( 'Table'[Cost] )
Monthly Average Cost =
CALCULATE (
AVERAGEX ( VALUES ( Calendar[Month] ), [Total Cost] ),
// clear Calendar filter context
ALL ( Calendar ),
// keep the Year filter context from the slicer
VALUES ( Calendar[Year] )
)
Proud to be a Super User!
Thanks, but that did not work
It gives me 0 in the table and when I click on a specif month, it gives me strange values 🙂
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 |
---|---|
100 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
105 | |
86 | |
72 |