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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
andreasalleslev
Helper I
Helper I

How to sum all up to selected max date

Hallo

 

Can someone help me to create af measure that sum all post from first date to the max selected date in slicer.

 

This measure works (ofcauce)

 

Saldo = CALCULATE(SUM(NavPosteringer[Belรธb]),
ALL(Datetable[Date]),
NavPosteringer[Bogfรธringsdato] <= DATE(2021, 08, 31))
 
but when i change to:
Saldo = CALCULATE(SUM(NavPosteringer[Belรธb]),
ALL(Datetable[Date]),
NavPosteringer[Bogfรธringsdato] <= MAX(Datetable[Date])) 


is dosent work.
How can i do it??
 
Best regards Andreas
1 ACCEPTED SOLUTION

Did you select any date on the slicer?

Try this:

Saldo2 = CALCULATE(SUM(NavPosteringer[Belรธb]), FILTER(ALL(NavPosteringer[Bogfรธringsdato]),NavPosteringer[Bogfรธringsdato] <= SELECTEDVALUE(Datetable[Date],MAX(Datetable[Date]))))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your KudosโœŒ๏ธ!!

 

View solution in original post

6 REPLIES 6
VahidDM
Super User
Super User

Hi @andreasalleslev 

 

You need to use the  SELECTEDVALUE dax code.

Try this:

Saldo = CALCULATE(SUM(NavPosteringer[Belรธb]),
ALL(Datetable[Date]),
NavPosteringer[Bogfรธringsdato] <= SELECTEDVALUE(Datetable[Date])) 
 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your KudosโœŒ๏ธ!!

 
 

Hallo

Thank you, but i get a error:

 

andreasalleslev_0-1631786247021.png

Hmm?? have you any idea??

@andreasalleslev 

That is because you need to use that in filter.

try this:

Saldo = CALCULATE(SUM(NavPosteringer[Belรธb]),
Filter(ALL(Datetable[Date]),NavPosteringer[Bogfรธringsdato] <= SELECTEDVALUE(Datetable[Date])))
 
 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos๐Ÿ™!!

Okay - now I not got a error, but is dont calculate.

 

Saldo2 = CALCULATE(SUM(NavPosteringer[Belรธb]), FILTER(ALL(NavPosteringer[Bogfรธringsdato]),NavPosteringer[Bogfรธringsdato] <= SELECTEDVALUE(Datetable[Date])))
 
the saldo2 is blank. 

Did you select any date on the slicer?

Try this:

Saldo2 = CALCULATE(SUM(NavPosteringer[Belรธb]), FILTER(ALL(NavPosteringer[Bogfรธringsdato]),NavPosteringer[Bogfรธringsdato] <= SELECTEDVALUE(Datetable[Date],MAX(Datetable[Date]))))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your KudosโœŒ๏ธ!!

 

Thank you som much - Is exacly what i want.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (25)