cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PranjaliK
Frequent Visitor

To calculate difference between two quarters eg:- Q4 2018 - Q42019

Hello guys,

 

I am relatively new to power BI DAX.

I am trying to calculate the difference between Q1 2018 and Q4 2019.

Please guide me how to proceed.

I have created Calendar table and tried to use some Time intelligence calculations as well.

Below is link has the test data csv I am working on.

 

https://drive.google.com/file/d/1MZ526WmzVzKEdhtj31XeowBrJWjWofPc/view?usp=sharing

1 ACCEPTED SOLUTION
selimovd
Community Champion
Community Champion

Hey @PranjaliK ,

 

load the data to Power BI, create a date table and connect it to your data table.

Then you can create your measure and analyze it for the current quarter.

Create a second measure and change the time you want to analyze to 21 months in the past:

MyMeasure 21 Month ago =
CALCULATE(
    [MyMeasure],
    DATEADD( DateTable[Date], -21, MONTH )
)

 

That should be your solution,

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

3 REPLIES 3
PranjaliK
Frequent Visitor

Thank You all I got answer for my another question as well from both answers😁

Jihwan_Kim
Community Champion
Community Champion

Hi, @PranjaliK 

Please check the below picture and the sample pbix file's link, whether it is what you are looking for.

All measures are in the sample pbix file, and steps are numbered in fron of each measure.

 

Picture1.png

 

Picture2.png

 

https://www.dropbox.com/s/6733m5935g59r8d/pranj.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: https://www.linkedin.com/in/jihwankim1975/


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Best regards, JiHwan Kim


Linkedin: https://www.linkedin.com/in/jihwankim1975/

Twitter: https://twitter.com/Jihwan_JHKIM

selimovd
Community Champion
Community Champion

Hey @PranjaliK ,

 

load the data to Power BI, create a date table and connect it to your data table.

Then you can create your measure and analyze it for the current quarter.

Create a second measure and change the time you want to analyze to 21 months in the past:

MyMeasure 21 Month ago =
CALCULATE(
    [MyMeasure],
    DATEADD( DateTable[Date], -21, MONTH )
)

 

That should be your solution,

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors