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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.