Forum Discussion

ChoiJunghoon's avatar
ChoiJunghoon
Icon for Helper III rankHelper III
5 years ago
Solved

DAX Calucate sum with filter

Hello. I am facing the little problem. 
Could you save me ? 

Table 

Datevalue
2021-3-11
2021-3-110
2021-3-32

2021-3-5

null
2021-3-6

2

2021-3-8null
2021-3-1010
2021-3-1120
2021-3-1130

 

Create Table inVisualization

I want to create measure.. 

Table[Data] <= 2021-3-8 is 0 

Table[Data] > 2021-3-8 is null 

DateMeasure
2021-3-111
2021-3-32

2021-3-5

0
2021-3-6

2

2021-3-80
2021-3-10 
2021-3-11 

 

Measure=

 Var x1= SELECTEDVALUE(Table[Date])
 Var x2= IF (x1<='2021-3-8,0,BLANK())

 RETURN
CALCULATE(
sum(Table[Value]),
FILTER(
Table,Table[Date]<='2021-3-8'
)
)

Could you help me...