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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Migasuke
Memorable Member
Memorable Member

Previous Quarter of Previous Year

Hi,

I am searching for DAX solution, where in calculated column I mark most recent Q and also the same Q for previous year.
Here is my example (In Scope column is desired solution)

Migasuke_0-1652988797971.png

As we see, my latest data is for April 2022, which is Q2. Due to that I mark it as "Yes", but I also need to mark "Yes" the Q2 in previous year.

Any idea how to do it dynamic?



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hello:

Can you try this calc column:(I added date table) and will attach file..https://drive.google.com/file/d/1W3cetda55qW0mKxle1XlAxKPSDQeot7w/view?usp=sharing 

IsCurrent/prev/Qtr =
IF (OR(
YEAR ( data[Date] ) = YEAR ( TODAY () )
&& QUARTER ( data[Date] ) = QUARTER ( TODAY () ), YEAR ( data[Date] ) = YEAR ( TODAY ()-365 )
&& QUARTER ( data[Date] ) = QUARTER ( TODAY () -365)),
"Yes",
"No"
)
Whitewater100_0-1652991182094.png

I hope this solves your question..Thanks

View solution in original post

2 REPLIES 2
Whitewater100
Solution Sage
Solution Sage

Hello:

Can you try this calc column:(I added date table) and will attach file..https://drive.google.com/file/d/1W3cetda55qW0mKxle1XlAxKPSDQeot7w/view?usp=sharing 

IsCurrent/prev/Qtr =
IF (OR(
YEAR ( data[Date] ) = YEAR ( TODAY () )
&& QUARTER ( data[Date] ) = QUARTER ( TODAY () ), YEAR ( data[Date] ) = YEAR ( TODAY ()-365 )
&& QUARTER ( data[Date] ) = QUARTER ( TODAY () -365)),
"Yes",
"No"
)
Whitewater100_0-1652991182094.png

I hope this solves your question..Thanks

Anonymous
Not applicable

HI if you have a date table it will be easy. Do you have it ?

https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.