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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Moving average of a full month

Hi everyone,

 

At the moment i have a problem with my moving average. 

BramKruiswijk_1-1620629977304.png

As you can see in the picture the moving average drops, because it count the month May. But the month May isn't over yet so it shouldn't be included in the moving average, because it gives a wrong image of the moving average. So i want to exclude the month we are in. I used the automatic formula that power bi provides;

BramKruiswijk_2-1620630202753.png

Is there a way to exlude the current month in the moving average so it gives a right image of the moving average in three months?

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , in the last calculate, move all into a filter

and try like

filter(all(Kalendar]) , Kalendar[date]<=emonth(today(),-1)

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

You've missed out the closing bracket for ALL function:

FILTER(ALL(Kalender)

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , in the last calculate, move all into a filter

and try like

filter(all(Kalendar]) , Kalendar[date]<=emonth(today(),-1)

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
Anonymous
Not applicable

Hi @amitchandak 

 

when i try to put in your exact part of the formula it gives a error ( is assume emonth =eomont because i cant find a dax with emont). First i copied your part:

FILTER(ALL(Kalender,Kalender[Datum]<=EOMONTH(TODAY(),-1)
but this give me a error that says ; The function Filter must have at least 2 arguments.

So i tried to fix this with this:
BramKruiswijk_1-1620639397085.png

But then it gives a error at <=

and when i removed <= out of the formula:

FILTER(ALL(Kalender,Kalender[Datum]),EOMONTH(TODAY(),-1)
it says the following error: multiple table arguments are not allowed in the ALL/ ALLNOBLANK/REMOVEFILTERS function.

 

Any ideas how to solve this? thank you

 

You've missed out the closing bracket for ALL function:

FILTER(ALL(Kalender)

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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