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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
slc7456
Advocate III
Advocate III

Rolling Month and Quarter Calculation

Purpose: Calculate Rolling 12 months and Rolling Quarter based off todays date 

 

Background: I would like to display data only from the last 12 calendar months. Power BI offers this as a relative date filter, but I would like to create a measure called "Rolling 12 Months" that my user could use in a slice on the page. 

 

Does anyone know the DAX calculation to create a rolling 12 months based off today's date? 

 

I would also like to display data only from the current quarter, i.e. a Rolling Quarter measure. For example, if I use the Rolling Quarter as a filter all my data will only display data for October (since it's October 18th). 

 

Does anyone know the DAX calculation to create a Rolling Quarter based off today's date? 

 

Q1 - Jan, Feb, March

Q2 - April, May, June

Q3 - July, Aug, Sept

Q4 - Oct, Nov, Dec

 

1 ACCEPTED SOLUTION
slc7456
Advocate III
Advocate III

I created  Current Quarter Flag which allows me to filter my page on the current quarter. My rolling quarters issue is solved. Breakdown below

 

Curent Year = YEAR(TODAY())

Quarter = ROUNDUP([MonthNumber]/3, 0)

Current Quarter = ROUNDUP(MONTH([Current Date])/3, 0) 

Current Quarter Flag = if([Current Quarter] = [Quarter] && 'Date Dimension'[Year] = [Curent Year],"Y","N")

 

 

CurrentQuarterFlag.png

 

 

View solution in original post

1 REPLY 1
slc7456
Advocate III
Advocate III

I created  Current Quarter Flag which allows me to filter my page on the current quarter. My rolling quarters issue is solved. Breakdown below

 

Curent Year = YEAR(TODAY())

Quarter = ROUNDUP([MonthNumber]/3, 0)

Current Quarter = ROUNDUP(MONTH([Current Date])/3, 0) 

Current Quarter Flag = if([Current Quarter] = [Quarter] && 'Date Dimension'[Year] = [Curent Year],"Y","N")

 

 

CurrentQuarterFlag.png

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.