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

Get previous column values to calculate new one

Hello,

I've been struggling with a problem for a while now and I could really use some help.

I need to recreate this table.

 

Ayreon69_0-1711551774301.png

The first column is a fairly simple formula, and the subsequent columns are calculated by taking the value from the previous column, corresponding to the previous month, except for the first month which uses the value from the first column.



Ayreon69_1-1711551949260.png

 

So, I've created the necessary measures to calculate this table, but I can't figure out how to retrieve the previously calculated value. The formula should be something like:

For example for the 2nd of 2024 month you should do  387 +616 - 236 = 767
For the 1 month of 2023 ex : 2276 + 189 - 612 = 1853

First tab(n-1) + Ouverture N - Fermeture N.

 

Any assistance would be greatly appreciated! Thank you in advance.

 

Here is the pbix file  : help.pbix

 

3 REPLIES 3
Ayreon69
Regular Visitor

Can someone help me please

v-shex-msft
Community Support
Community Support

HI @Ayreon69,

Currently, I can't access to the share file link due to some network reasons. Can you please provide some dummy data here and pasted to your post with table format? Then we can use these dummy data to testing coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

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

Sure, here is some example of data I have, thank's for the answer.

 

compteur type année ouverturemois ouvertureannee survenancestock 31/12/n-1année fermeturemois fermeture
1attritionnel 202412024020241
1attritionnel 20231220230202312
1attritionnel 202412024020241
1attritionnel 2023122023120241
1attritionnel 2023122023120242
1attritionnel 2023112023120242
1attritionnel 2023122023120241
1attritionnel 2023122023120241
1attritionnel 20231220230202312

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.