Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |