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
Sir_night
Helper I
Helper I

Percentage change across matrix

i've created a matrix which looks at total accross the months

 

How do i calculate the Persentage diffrence between months

Capture.PNG

 

 

 

 

1 ACCEPTED SOLUTION
GilbertQ
Super User
Super User

Hi @Sir_night

 

What I would suggest is to first make sure that your data is in the correct shape.

 

So to do this your data as per your picture would not be running on columns but would then be running on the rows.

 

Next I would then create a Date table (This table is essential when you want to use the DAX Time Ingelligence Calculations). You can find my blog post here on how to create a Date table: https://www.fourmoo.com/2016/09/13/power-bi-how-to-easily-create-dynamic-date-tabledimension-with-fi...

 

Once you have created a relationship between your table and the Date table, you can then start using Time Intelligence Features.

 

For your example it would appear that you could then use the PREVIOUSMONTH DAX function

Previous Month Sales = 
CALCULATE ( [Sales Amount], PREVIOUSMONTH ( 'Date'[Calendar Date] ) )

This will enable you to then get the previous values amounts, after which you could then create your % Diff measure

% Diff = DIVIDE([Previous Month Sales],[Sales Amount])




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

View solution in original post

1 REPLY 1
GilbertQ
Super User
Super User

Hi @Sir_night

 

What I would suggest is to first make sure that your data is in the correct shape.

 

So to do this your data as per your picture would not be running on columns but would then be running on the rows.

 

Next I would then create a Date table (This table is essential when you want to use the DAX Time Ingelligence Calculations). You can find my blog post here on how to create a Date table: https://www.fourmoo.com/2016/09/13/power-bi-how-to-easily-create-dynamic-date-tabledimension-with-fi...

 

Once you have created a relationship between your table and the Date table, you can then start using Time Intelligence Features.

 

For your example it would appear that you could then use the PREVIOUSMONTH DAX function

Previous Month Sales = 
CALCULATE ( [Sales Amount], PREVIOUSMONTH ( 'Date'[Calendar Date] ) )

This will enable you to then get the previous values amounts, after which you could then create your % Diff measure

% Diff = DIVIDE([Previous Month Sales],[Sales Amount])




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.