Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Last Quarter Calculation

I have this data:

1.PNG

 

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.

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

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")))

 

q5.jpg

 

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

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.