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
Hi!
I'm using information from 3 different tables to create this table, that can be sorted by 3 filters (Shop, Part and Region):
NumberFailures is calculated as:
Solved! Go to Solution.
From what you've described, the issue arises when you're trying to calculate the running total of the failure rate for an entire region, like the UK. The problem seems to be with the TotalComponents measure, which is only considering the components from a single shop when you filter by a specific year, rather than all the shops in the region.
To solve this, you need to adjust the way you're calculating TotalComponents so that it takes into account all the shops in the selected region, regardless of whether there were failures in that year or not.
One way to do this is to modify the TotalComponents measure to ensure it's summing up the components from all shops in the selected region, rather than just the ones with failures in the filtered year. Here's a possible solution:
Instead of:
TotalComponents = sum(NoComponents[NoComponents])+[NumberFailures]
You might try:
TotalComponents =
CALCULATE(
SUM(NoComponents[NoComponents]),
ALLSELECTED(Shops[Shop]),
VALUES(Shops[Region])
) + [NumberFailures]
This modification to TotalComponents uses ALLSELECTED to ensure that all shops within the selected region are considered, even if they didn't have failures in the specific year you're looking at. The VALUES function ensures that the calculation respects the region filter.
By making this adjustment, when you calculate the running total for the failure rate across a region, it should now consider the components from all shops in that region, giving you a more accurate accumulated failure rate.
From what you've described, the issue arises when you're trying to calculate the running total of the failure rate for an entire region, like the UK. The problem seems to be with the TotalComponents measure, which is only considering the components from a single shop when you filter by a specific year, rather than all the shops in the region.
To solve this, you need to adjust the way you're calculating TotalComponents so that it takes into account all the shops in the selected region, regardless of whether there were failures in that year or not.
One way to do this is to modify the TotalComponents measure to ensure it's summing up the components from all shops in the selected region, rather than just the ones with failures in the filtered year. Here's a possible solution:
Instead of:
TotalComponents = sum(NoComponents[NoComponents])+[NumberFailures]
You might try:
TotalComponents =
CALCULATE(
SUM(NoComponents[NoComponents]),
ALLSELECTED(Shops[Shop]),
VALUES(Shops[Region])
) + [NumberFailures]
This modification to TotalComponents uses ALLSELECTED to ensure that all shops within the selected region are considered, even if they didn't have failures in the specific year you're looking at. The VALUES function ensures that the calculation respects the region filter.
By making this adjustment, when you calculate the running total for the failure rate across a region, it should now consider the components from all shops in that region, giving you a more accurate accumulated failure rate.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 19 | |
| 18 | |
| 11 | |
| 10 |