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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 @Anonymous ,

 

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
Anonymous
Not applicable

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

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

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 @Anonymous ,

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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