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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rosarie9
New Member

Trying to calculate adherence with the plan output vs the actual output

Hi everyone,

 

I need some help trying to calculate the adherence of the plan with the actual output. This is an example of what i've been trying to do in powerbi. 

350013.48%4,08011.25%
710027.35%686626.45%
1536059.17%1329951.23%
 100.00% 88.93%

 

the second column perform the following calculation A1/SUM(A$1:A$3). basically is a division between whatever is in the A cell and the total amount of the A column. 

 

and the 4th column calculate the following ecuation IF((D2/B2)<=1,(D2/B2)*C2,(1-((D2/B2)-1))*C2). 

 

I create the three following measure 

 

aver%output =

SUM('MFG QA Man (2)'[Actual Output])/ SUM('MFG QA Man (2)'[Plan Output])

 

TotalVolume =
DIVIDE(SUM('MFG QA Man (2)'[Plan Output]), CALCULATE(SUM('MFG QA Man (2)'[Plan Output]), ALLSELECTED('MFG QA Man (2)')))
 
Adherencia =
VAR Porcentaje = ('MFG QA Man (2)'[aver%output])
VAR Resultado =
SWITCH(TRUE(), Porcentaje <= 1, Porcentaje * 'MFG QA Man (2)'[TotalVolume], Porcentaje > 1, (1 - (Porcentaje - 1)) * 'MFG QA Man (2)'[TotalVolume])
RETURN Resultado
 
The problem is when the power bi perform the calculation of the adherence its doing the sum of the total adherence wrong 
rosarie9_0-1692038187792.png

the total should be 88.93% instead of 93.39% and i dont know what else to do.

 

PS. Sorry for bad english 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rosarie9 ,

It seems that the sum of the MEASURES is not correct.

Please create measures based on the Adherencia.

VALUE_ =
VAR _a = 'table'[Adherencia]
VAR _b =
    SUMMARIZE ( 'table', 'table'[date], "aaa", 'Product'[Adherencia] )
RETURN
    IF ( ISINSCOPE ( 'table'[date] ), _a, SUMX ( _b, [aaa] ) )

Or you can change the 'table'[date] to the unique value in the table like the index.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @rosarie9 ,

It seems that the sum of the MEASURES is not correct.

Please create measures based on the Adherencia.

VALUE_ =
VAR _a = 'table'[Adherencia]
VAR _b =
    SUMMARIZE ( 'table', 'table'[date], "aaa", 'Product'[Adherencia] )
RETURN
    IF ( ISINSCOPE ( 'table'[date] ), _a, SUMX ( _b, [aaa] ) )

Or you can change the 'table'[date] to the unique value in the table like the index.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

Alef_Ricardo_
Resolver II
Resolver II

Hi Rosarie9, welcome to the community! 😊

It seems like you're trying to calculate the adherence of the plan with the actual output using Power BI. From your description, it looks like you have created three measures: `aver%output`, `TotalVolume`, and `Adherencia`. However, the total adherence calculated by Power BI is not matching your expected result.

One possible solution to this issue could be to check the calculations used in your measures and make sure they are correct. You could also try breaking down the calculations into smaller parts to see if each part is returning the expected result.

 

It seems like you have created three measures: `aver%output`, `TotalVolume`, and `Adherencia`. However, the total adherence calculated by Power BI is not matching your expected result.

One possible solution to this issue could be to check the calculations used in your measures and make sure they are correct. You could also try breaking down the calculations into smaller parts to see if each part is returning the expected result.

Another approach could be to use the `CALCULATE` function in Power BI, which allows you to perform calculations on a filtered version of your data. You can find more information about the `CALCULATE` function in this [DAX tutorial].

If you're still having trouble, you could try posting your question on the [Microsoft Fabric Community] or [Power BI Community] forums, where other users might be able to help you with your specific issue.

I hope this helps! Let me know if you have any further questions. 😊

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.