Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all.
I have two tables Prod[Talhao] 1-> * Talhao[Talhao] and i have two measures:
When filter in chart, the measure also work, but when filter in slicer, dont:
Solved! Go to Solution.
It seems like you're encountering a common issue with Power BI when using slicers and filters. When slicers are applied, they filter the data differently from when filters are applied directly to visualizations. This can affect the results of your measures, as you've observed.
To ensure that your measures behave consistently whether you filter using slicers or filter panes directly on visualizations, you can adjust your DAX measures to consider the context correctly.
One approach is to use functions like CALCULATE and FILTER to modify the context within which your measures are evaluated. Here's how you can modify your measures META and COLHIDO%:
META =
VAR AvgHectare = AVERAGE(Talhao[NN3_HECTAR]) * 25000
RETURN
CALCULATE(
SUMX(Talhao, AvgHectare),
ALL(Talhao)
)
COLHIDO% =
VAR TotalQuantity = SUM(Prod[QUANTIDADE])
RETURN
DIVIDE(
TotalQuantity,
[META],
0
)
In these modified measures:
With these modifications, your measures should behave consistently whether you filter using slicers or directly on charts. Adjustments might be necessary depending on your exact requirements and data model.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
It seems like you're encountering a common issue with Power BI when using slicers and filters. When slicers are applied, they filter the data differently from when filters are applied directly to visualizations. This can affect the results of your measures, as you've observed.
To ensure that your measures behave consistently whether you filter using slicers or filter panes directly on visualizations, you can adjust your DAX measures to consider the context correctly.
One approach is to use functions like CALCULATE and FILTER to modify the context within which your measures are evaluated. Here's how you can modify your measures META and COLHIDO%:
META =
VAR AvgHectare = AVERAGE(Talhao[NN3_HECTAR]) * 25000
RETURN
CALCULATE(
SUMX(Talhao, AvgHectare),
ALL(Talhao)
)
COLHIDO% =
VAR TotalQuantity = SUM(Prod[QUANTIDADE])
RETURN
DIVIDE(
TotalQuantity,
[META],
0
)
In these modified measures:
With these modifications, your measures should behave consistently whether you filter using slicers or directly on charts. Adjustments might be necessary depending on your exact requirements and data model.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
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 |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |