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 have this data:
I was attempting to get the average of the first quarter, however it is only returning the last month of the first quarter. Doing the math by hand, the number should be returning -9.42 if I'm averaging -5.88,-9.86 and -17.39. How can I appropriately calculate this? The Month End column is column is coming from a date table.
Hi @Anonymous,
In your scenario, the [TTM Average] is a measure. As I don’t know the raw data and logic of this measure, I treat the measure as a column in my test. Also the average of -5.88, -9.86, -17.39 should be (-5.88-9.86-17.39)/3=-11.04. Not sure why you would like to return it as -9.42.
Based on my test, you can create a measure to calculate the average of the first quarter below, and use your own measure "TTM average" to replace the "SUM(sheet 1[TTM average])" in my function on your side. You can also download the PBIX file to have a view.
First quarter average = DIVIDE(CALCULATE(SUM(Sheet1[TTM average]),FILTER(Sheet1,Sheet1[Quarter]="Qtr 1")),COUNTROWS(FILTER(Sheet1,Sheet1[Quarter]="Qtr 1")))
If above measure doesn’t meet your requirement. Please share some sample data for us to test it. It would be better if you could share the pbix file.
Best Regards,
Qiuyun Yu
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 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |