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
nike31
Regular Visitor

Values of previous month

 

Hello,


I have following table. In the first column there is the product group (there are several). In the second column there is the date and in the third row there is the value of the order backlog.

 

How can I create a forth column that shows the value of the previous month. E.g. in row 2 the previous month value would be from the 31st January and is 1178,86865

 

Thank you! 😃

 

grafik.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@nike31

 

I assume you'd like it to be based on the product group?

 

Then try this calculation:

 

= CALCULATE(SUM(Table[Auftragsbestand]); VALUES(Table[PG]);DATEADD(Table[Datum];-1;MONTH))

 

Let me know how it goes.

 

Best,

Martin

View solution in original post

5 REPLIES 5
v-shex-msft
Community Support
Community Support

Hi @nike31,

 

You can also try to use below formula to get last day amount of previous month.

Previous = LOOKUPVALUE([Amount],Sheet1[PG],[PG],Sheet1[Daturm],DATE([Daturm].[Year],[Daturm].[MonthNo],1)-1)+0

4.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I was facing a similar issue, and the accepted solution did not work for me for some reason. This one worked though, thanks!

Anonymous
Not applicable

@nike31

 

I assume you'd like it to be based on the product group?

 

Then try this calculation:

 

= CALCULATE(SUM(Table[Auftragsbestand]); VALUES(Table[PG]);DATEADD(Table[Datum];-1;MONTH))

 

Let me know how it goes.

 

Best,

Martin

Hey, Please advise, what if I want to base this on two columns

Thank you! This works perfectly!

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.