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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
the606
Helper I
Helper I

Rolling monthly moving annual count

Hi,

 

Im trying to create a bar chart visual giving me a count of all projects in the previous year from the month shown in the graph.

 

So using year in the Axis and the month in the Legend.

 

I have created the following but obvisouly it gives me the same figure as i have specified today, i cant seem to get what i need no matter what i do!

 

Moving Annual From Today = CALCULATE([Order Count], DATESINPERIOD('Date'[Date], TODAY(), -12, month))
Order Count = COUNT('Project Master'[Project Number])
 
So to be clear.
The first bar in the chart would show an order count from previous 12 months from today, the second bar would show an order count from a month ago to the previous 12 months and so on.
 
Im pulling my hair out.
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@the606 , You are trying to plot against time so it should change every month

 

Moving Annual = CALCULATE([Order Count], DATESINPERIOD('Date'[Date], max(Order[Date]), -12, month))

or

Moving Annual = CALCULATE([Order Count], DATESINPERIOD('Date'[Date], max(Date[Date]), -12, month))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@the606 , You are trying to plot against time so it should change every month

 

Moving Annual = CALCULATE([Order Count], DATESINPERIOD('Date'[Date], max(Order[Date]), -12, month))

or

Moving Annual = CALCULATE([Order Count], DATESINPERIOD('Date'[Date], max(Date[Date]), -12, month))

Wonderful! thanks so much, i was really struggling with this.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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