Forum Discussion
CALCULATE function result changes by using slicer
- 2 years ago
I found the problem. The value was influenced by the date-slicer, that was referencing the date column of the fact table. Since I created a date dimension table and changed the reference of the slicer, it works with only a CALCULATE function!
I tried. Using All(TableX) as another Filter in CALCULATE unfortunately leads to no filtering at all.
What is the column you are using as the filter in the slicer?
put ALL on that column
- nick10972 years agoFrequent Visitor
It doesn´t solve it.
But maybe back to my original question: Why does the slicer (Product Type) affect the result of my CALCULATE function, where I already filtered product type to be "B"? For example when I am slicing product type "A" only.
Side note: When I am slicing product type "A" and "B" the value is correct again (like slicing product type "B" only).
I understand that other filters have influence on the measure. But since product type is already filtered in the measure, I expected the measure to overrule the product type slicer at least.
In the example: I expected the correct value. But instead it is a value not far from the correct one and I can´t explain that.
- Gabry2 years agoSuper User
As far as I understand, if the filter is applied to the same column that is also used in the slicer, the slicer's selection should be overwritten by the calculate filter.
Maybe try also this:
Process Time B =
CALCULATE(
AVERAGE(
TableX[Process Time]
),Filter(All(TableX),
TableX[Product] = "B",)
)- nick10972 years agoFrequent Visitor
Again, this leads to no filtering at all.