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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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