Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ChoiJunghoon
Helper III
Helper III

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... 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ChoiJunghoon , Try a measure like

 

if(max(Table[Date])<='2021-3-8', sum(Table[Value])+0, blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ChoiJunghoon , Try a measure like

 

if(max(Table[Date])<='2021-3-8', sum(Table[Value])+0, blank())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you !!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.