Forum Discussion

MR2001's avatar
MR2001
Helper II
10 years ago
Solved

Filtering records based on a slicer

I have the following calculated column that works correctly:

 

Total PCR = 
VAR Date1 = 'Table1'[date]
RETURN
CALCULATE (
SUM ('Table1'[Total] ),
FILTER (
'Table1',
'Table1'[date] <= Date1), 
FILTER( 'Table1', 'Table1'[Request_Type] = "Defect")
)

 

If I remove however the highlighted part and add a slicer based on [Request_Type] instead, it does not work correctly anymore. I was hoping a filter will change the way column calculates but it doesn't... Selecting "Defect" from the slicer does not produce the same result.

[Request_Type] column has three possible values: "Defect", "Enhancement", "Change".

 

How can I make it work based on a filter/slicer?

2 Replies