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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
sanghamitra123
New Member

QoQ comparison of last two years

Hi Everyone,

 

Need your help as i am new to Power Bi. I need to compare the QoQ for two years, lets say Q1 2017 Vs Q1 2018. so when i drill down this comparision, it should be Month 2017 Vs Month 2018 and further week 2017 Vs week 2018. Pls let me know how to do this. Appreciate an early reply, since its very urgent for me.

 

Thank you.

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @sanghamitra123,

 

It seems that you want to compare the QoQ for two years.

 

Here is my sample. If you create two measures like below, then you could get the compare chart for QoQ for two years.

2017 Qtr = CALCULATE(SUM(Table1[Sales]),FILTER('Table1',YEAR('Table1'[Date])=YEAR(MIN('Table1'[Date]))))

2018 Qtr = CALCULATE(SUM(Table1[Sales]),FILTER('Table1',YEAR('Table1'[Date])=YEAR(MIN('Table1'[Date]))+1))

Capture.PNG

 

In addition, you could have a reference of this video for Quarter On Quarter Sales Trends In Power BI - DAX Formula.

 

If you still need help, please share some data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @sanghamitra123,

 

It seems that you want to compare the QoQ for two years.

 

Here is my sample. If you create two measures like below, then you could get the compare chart for QoQ for two years.

2017 Qtr = CALCULATE(SUM(Table1[Sales]),FILTER('Table1',YEAR('Table1'[Date])=YEAR(MIN('Table1'[Date]))))

2018 Qtr = CALCULATE(SUM(Table1[Sales]),FILTER('Table1',YEAR('Table1'[Date])=YEAR(MIN('Table1'[Date]))+1))

Capture.PNG

 

In addition, you could have a reference of this video for Quarter On Quarter Sales Trends In Power BI - DAX Formula.

 

If you still need help, please share some data sample and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherry,

 

I managed to get the chart as below, thanks a lot. Pls let me know if there is a way to drill down further into months and weeks in the same chart, comparing two years (Same as we did for quarter) 

 

Regards

Sanghamitra

 

Hi Cherry,

 

The below graphs looks absolutely fine for me.

 

I tried this way, the problem here is i am n ot using any DB, i am using Excel. Is there a way we can write measures for excel too.

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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