Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Please help with the measure - there is a flat table according to which the indicator is calculated:
If you count separately for the branch, then everything is fine, but in the total amount the value is incorrect.
Please tell me:
- how effective is this measure (the denominator needs the filter "Efficiency" <> 0, so I used IF ( CALCULATE ( SUM ( Table3[Value] ), Table3[Measures] = "Efficiency" ), 1 ))
- how to fix the total indicator.
https://drive.google.com/file/d/1s1mlFoqKb-eLB0wKqvSL_XcVz6y0eMKd/view?usp=sharing
Solved! Go to Solution.
Hi @Oleg222 ,
Try the following formula:
Measure =
DIVIDE(
SUMX(
SUMMARIZE( Table3, Table3[Date], Table3[Branch] ),
[Efficiency] * [Weight]
),
SUMX(
VALUES(Table3[Date]),
IF ( CALCULATE ( SUM ( Table3[Value] ), Table3[Measures] = "Efficiency" ), 1 )
* CALCULATE ( SUM ( Table3[Value] ), Table3[Measures] = "Weight" )
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-kkf-msft The problem was not solved. Unfortunately, I don't know how to explain the logic of the formula. There are daily data on the indicator (moisture) and product weight. A formula for calculating the weighted average is required - for calculating by periods (weeks, months, years).
Hi @Oleg222 ,
I'm not sure if my understanding is correct. I think column "Efficiency" is the variable and column "Weight" is the corresponding weight. Does the total part you said it is incorrect mean the part shown in the red circle in the figure below? The calculation formula of the total part I understand is
Best Regards,
Winniz
@v-kkf-msft The problem in All, its incorrect (I think the problem is in the numerator - in the total, the sum "Efficiency" is multiplied with the sum of the denominator, but it should be multiplied every day (weighted average)).
Hi @Oleg222 ,
Try the following formula:
Measure =
DIVIDE(
SUMX(
SUMMARIZE( Table3, Table3[Date], Table3[Branch] ),
[Efficiency] * [Weight]
),
SUMX(
VALUES(Table3[Date]),
IF ( CALCULATE ( SUM ( Table3[Value] ), Table3[Measures] = "Efficiency" ), 1 )
* CALCULATE ( SUM ( Table3[Value] ), Table3[Measures] = "Weight" )
)
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Oleg222 ,
Does your problem have been solved?
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
@aj1973 "Efficiency" in different periods, weighted by "Weight". The result by periods and by branches is OK, but the total amount is not correct.
Hi @Oleg222 ,
I don't understand your formula. It seems to me that the calcalation result of measure "Weighted Average3" is the same as the result of measure "Efficiency".
Could you please give me an example of what total value you expect?
Best Regards,
Winniz
I think the problem is in the numerator - in the total, the sum "Efficiency" is multiplied with the sum of the denominator, but it should be multiplied every day (weighted average).
Hi @Oleg222
Your formula is not clear! Avarage of what that you want to see? you want to DIVIDE what by what?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!