Forum Discussion
ChoiJunghoon
Helper III
5 years agoDAX Calucate sum with filter
Hello. I am facing the little problem.
Could you save me ?
Table
| Date | value |
| 2021-3-1 | 1 |
| 2021-3-1 | 10 |
| 2021-3-3 | 2 |
2021-3-5 | null |
| 2021-3-6 | 2 |
| 2021-3-8 | null |
| 2021-3-10 | 10 |
| 2021-3-11 | 20 |
| 2021-3-11 | 30 |
Create Table inVisualization
I want to create measure..
Table[Data] <= 2021-3-8 is 0
Table[Data] > 2021-3-8 is null
| Date | Measure |
| 2021-3-1 | 11 |
| 2021-3-3 | 2 |
2021-3-5 | 0 |
| 2021-3-6 | 2 |
| 2021-3-8 | 0 |
| 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...
Could you help me...
2 Replies
- amitchandak
Super User
- ChoiJunghoon
Helper III
Thank you !!!