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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
Super User
Super User

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
Super User
Super User

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 accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


selimovd
Super User
Super User

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
 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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