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
Good afternoon, I need to calculate a weighted cost per item and wanting to do it the total that shows me the table is wrong.
I have the following measurement:
In this example, the box should show 7.26%
If I change the "billed units", the total in that column is not updated, it is fixed at 7.21%.
Thanks in advance for the help!!
Best regards
looks like you're working with Power BI and trying to calculate a weighted cost per item, but you're encountering an issue where the total displayed in the table is not updating as expected when you change the "billed units." The total remains fixed at 7.21% when it should be 7.26%.
This issue could be related to the way the measures are calculated and the interaction with the filter context. It's possible that the calculation for the total is not considering the changes in "billed units." To address this issue, you can try the following steps:
Check Measure Dependencies: Ensure that the measure you are using for "billed units" is correctly defined and that it responds to changes in filters or slicers that may affect it.
Review Filter Context: Review the filter context in your report to make sure there are no conflicting filters or slicers that might be causing the total to remain fixed.
Evaluate Measure Logic: Double-check the logic of your measures CostoListaASerComparada and CostoListaAnterior. Verify that they correctly respond to changes in "billed units."
Use Variables: Consider using variables to break down your measures into smaller, more understandable parts. This can help with debugging and understanding the behavior of your measures.
Check Data Model Relationships: Verify that the relationships between your tables are set up correctly. Incorrect relationships can lead to unexpected results in calculations.
Test with Different Data: Sometimes, the issue might be data-specific. Try applying your measures to different data points to see if the problem persists.
Clear Filters: Sometimes, cached filter values can cause unexpected behavior. Try clearing all filters and slicers in your report to see if the total updates correctly.
Check for Circular Dependencies: Ensure that there are no circular dependencies in your measures that might be causing unexpected behavior.
Without access to your complete Power BI project and dataset, it's challenging to pinpoint the exact issue. However, by following these steps and carefully reviewing your measures and filter context, you should be able to identify and resolve the problem with the total not updating as expected. Additionally, using variables for intermediate results can make your measures more transparent and easier to debug.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 36 | |
| 33 | |
| 31 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 86 | |
| 85 | |
| 68 | |
| 64 |