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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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...

 

skeets20
Resolver I
Resolver I


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
March Fabric Community Update

Fabric Community Update - March 2024

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

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.