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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
moia79
Helper I
Helper I

Calculate monthly data accuracy

Dear gurus

 

I am facing the following challenge to calculate data accuracy for aggregate of products and time buckets

 

My data source has the following structure

ItemDescriptionItem groupDimensionyearmonthquantity
abcabc_descgroup 1Actuals202210512
abcabc_descgroup 1Forecast202210500
abcabc_descgroup 1Actuals20229485
abcabc_descgroup 1Forecast20229400
cdecde_descgroup 1Actuals2022925
cdecde_descgroup 1Forecast2022920
efgefg_descgroup 2Actuals202284000
efgefg_descgroup 2Forecast202283750
ghighi_descgroup 2Actuals20228800
ghighi_descgroup 2Forecast20228925

 

I would need to calculate the accuracy per month and item group, i.e the result should me

 

 2022_08
Item groupActualsForecastFCA
group 1Σ all actuals of group 1 in month 08Σ all Forecast of group 1 in month 08Average of (Fcast - actual)/(Forecast+actual) calculated at item level for all items of group 1
group 2Σ all actuals of group 2 in month 08Σ all Forecast of group 2 in month 08Average of (Fcast - actual)/(Forecast+actual) calculated at item level for all items of group 2

 

the calculation should be for all months that are selected via a slicer. 

 

Am struggling with the sum and how to reflect in different months, anyone has a suggestion on how to build the file?

 

thanks a lot

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @moia79 ,

 This might help get you started- create a measure for actuals and a measure for forecast.

 

Actuals= CALCULATE(SUM(Tablename[quantity]), FILTER(Tablename,Tablename[Dimension]="Actuals"))

Forecast= CALCULATE(SUM(Tablename[quantity]), FILTER(Tablename,Tablename[Dimension]="Forecast"))

 

Then add a matrix visual and put item group in the Rows and Actuals and Forecast in the Values. You can add a filter to the matrix to select a particular month. You could also add Month to the matrix Columns.

View solution in original post

1 REPLY 1
djurecicK2
Super User
Super User

Hi @moia79 ,

 This might help get you started- create a measure for actuals and a measure for forecast.

 

Actuals= CALCULATE(SUM(Tablename[quantity]), FILTER(Tablename,Tablename[Dimension]="Actuals"))

Forecast= CALCULATE(SUM(Tablename[quantity]), FILTER(Tablename,Tablename[Dimension]="Forecast"))

 

Then add a matrix visual and put item group in the Rows and Actuals and Forecast in the Values. You can add a filter to the matrix to select a particular month. You could also add Month to the matrix Columns.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.