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
jppuam
Helper V
Helper V

dinamic accouting

Hello,

i need to analyse to viability of several projets, 

 

 

image.png

in this example i have a project that starts on march 16.

So to compare in 2017, i cannot compare jan and fev of 2017, because i have to compare 2017 with 2016.

 

But in 2018, i have to compare the full year of 2018 and 2017. 

How can i do a formula to make the diference of the several years dinamically ?

 

thanks,

JR

 

 

 

4 REPLIES 4
affan
Solution Sage
Solution Sage

Hi @jppuam

 

If you have data as shown in the above table and you want to compare it, can you please share what is your expected outcome?

 

Regards,

Affan

What i want is the diference between 2017/2016, and 2018/2017.

So the result would be :

 

march 2017 - march 2016 = (7 - 7)

april 2017 - april 20216 = (6 - 😎

.....

thus, i have the diferent between 2017 and 2016.

 

 

But when i do the varition between 2018 and 2017, i have : 

jan 2018 - jan 2017

fev 2018 - fev 2017

....

so i'll have the diference 2018 - 2017

 

the question for me is, becasuse the projet start em mar 2016, how can i make the operations with 2017. Because, i cant considerer the jan e fev of 2017, when compare to the 2016, but i have to considerer when making the variation regarding 2018.

 

i dont know if its was clear,

thanks,

JR

hi, @jppuam

     You may try to use SAMEPERIODLASTYEAR Function to create a measure like below:

Measure = CALCULATE(SUM(Table2[Sales]),SAMEPERIODLASTYEAR(Table2[Date]))

Difference

Measure 2 = CALCULATE(SUM(Table2[Sales]))-[Measure]

or

Measure 3 = IF(ISBLANK([Measure])=FALSE(),CALCULATE(SUM(Table2[Sales]))-[Measure])

Result:

23.PNG

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

 

How is your base data arranged and what end result are you expecting?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.