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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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)

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)

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors