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
veakin
Helper II
Helper II

Percentage change month and quarter

Hi,

 

I need help calculating the percentage change from the previous months and quarters.

 

I know of the two formulas previousmonths and previousquarter. However, I can't make it work...

 

I have five different numeric values, let's call them:

A, B, C, D, E

Then I have a Date_Snap_key, let's call it:

Date_1

 

Can anyone be of help regarding this issue. 

6 REPLIES 6
veakin
Helper II
Helper II

The dates are not only on monthly basis - they are daily... Also, I can´t call the month measure as it won't let me select the measure ´closing balance´...

veakin
Helper II
Helper II

Hi,
Just to give you an idea of what I have, I have provided a table below...
I have around 3000 rows, so I couldn't provide it all

Closing balanceDate
140005007 December 2020
588991020 December 2020
158839223 april 2021
199999309 November 2021

Hi @veakin ,

Please have a try.

Create an index. Select Home >>Transform Data>>Add column>>Insex column>>From 1.

121.PNG

Then close and apply.

Create measures.

next_date = SUMX(FILTER(ALL('Table'),'Table'[Index]=SELECTEDVALUE('Table'[Index])-1),'Table'[Closing balance])
month = var diff = SELECTEDVALUE('Table'[Closing balance])-[next_date]
var month_=DIVIDE(diff,SELECTEDVALUE('Table'[Closing balance]))
return month_

啊啊啊啊.PNG

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards

Community Support Team _ Polly

v-rongtiep-msft
Community Support
Community Support

Hi @veakin .

Please provide some data and desired output.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards

Community Support Team _ Polly

veakin
Helper II
Helper II

Yeah I have this column: 

veakin_0-1636044891716.png

This is what I have:

veakin_1-1636045095458.png

 

But my value columns is measures.. that's why its triggy...

 

Anonymous
Not applicable


I know of the two formulas previousmonths and previousquarter. However, I can't make it work...

 


Do you have a calendar table with "Mark as date table"  Built in time intelligence functions require that to function?  If you already have that done, can you share the DAX you are struggling with?

 

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.