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!
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",)
)
Again, this leads to no filtering at all.
- Gabry2 years agoSuper User
Process Time B =
CALCULATE(
AVERAGE(
TableX[Process Time]
),Filter(All(TableX[Product]),
TableX[Product] = "B",)
)
if not paste the pbix- nick10972 years agoFrequent Visitor
That works!Is there any possibility to do that without a FILTER-function to save performance? That was also my initial objective.
- Gabry2 years agoSuper User
Already tried this?
Process Time B =
CALCULATE(
AVERAGE(
TableX[Process Time]
),All(TableX[Product]),
TableX[Product] = "B")
Do you really have performance issue using filter or it's just speculation?As i know every filter put in the calculate functions it gets converted behind the scenes in a filter so
- nick10972 years agoFrequent Visitor
I oversaw something. It doesn´t work after all.
- Gabry2 years agoSuper User
Sounds really strange to me. Maybe paste the pbix I don't know