Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I would like to ask you how to write calculation formula in order to calculate a measure using only second part of date. I mean I have a slicer:
But I need that formula will respond only to these changes:
Means when I I turn left, turn right this slicer. I used FILTER('Date', Date<=MAX(Date) but it didn't help because it still responds to both dates.
Hi @Analitika
Hope you are doing well.
Have you solved this question? If you need more help, we'd like to help you. If you have solved this question, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.❤️
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Analitika
Create an independent calendar table,
Date = CALENDAR(DATE(2021,1,1),DATE(2021,12,31))
then create a measure and put it into visual-level filter,
filter =
var _max=MAXX(ALLSELECTED('Date'),'Date'[Date])
return IF(MAX('Table'[Date])<=_max,1,0)
Sum code:
Sum =
var _max=MAXX(ALLSELECTED('Date'),'Date'[Date])
return
CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Date]<=_max))
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@Analitika , Try a measure like given example
New Measure =
Var _max = maxx(allselected(Date) , Date[date])
return
calculate(sum(Table[value]), filter('Date', Date[date] =_max))
I have testes it not works. Seems not calculating at all.
@Analitika , Try like
New Measure =
Var _max = maxx(allselected(Date) , Date[date])
return
calculate(sum(Table[value]), filter(all('Date'), Date[date] =_max))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hello,
That not works at all.
I am also getting error that syntax for [date] is incorrect.
I used this formula for calculation so how to change it?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.