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

ABS sum by month before aggregating

Hello

 

I have a KPI I need to calculate which requires the absolute sum of each month to be calculated, before then summing them all together. 

 

I'm thinking sumx or summarize but not sure where to start.  

 

(Sum of abs errors P1 + sum of abs errors P2 + sum abs errors Pn) / (Total sales P1 + total sales P2 + total sales Pn)

 

where abs errors is just sales minus forecast.

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dapperscavenger , Try a measure like

 

sumx(values(Date[Month Year]), calculate(sum(Table[errors ])))

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @dapperscavenger ,

 

Could you kindly provide some sample data and the results you expect? So we can do more tests to see if we can help you solve the problem.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@dapperscavenger , Try a measure like

 

sumx(values(Date[Month Year]), calculate(sum(Table[errors ])))

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.