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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
joep78
Helper III
Helper III

Calculate start value versus final period

Hi all,

 

I'm looking for a solution that calculate the difference between my start value and the target value in the final period:

 

Targetvalue
A1200
  
  
yearForecast
20201100
2021100
2022900

 

In this example I expect that answer will be 300 (1200 as target minus 900 of the final year) 

 

Not sure how to deal with this, could be simple but not for me! Thanks in advance for a reply. 

 

Regards, Joep

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@joep78 

Create a measure as follows:

M = 
var __year = CALCULATE( max(table[year]) , all(table])) return

var __lastvalue = CALCULATE( sum(table[forecast]), table[year] = __year )

return

max(target[value]) - __lastvalue




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@joep78 

Create a measure as follows:

M = 
var __year = CALCULATE( max(table[year]) , all(table])) return

var __lastvalue = CALCULATE( sum(table[forecast]), table[year] = __year )

return

max(target[value]) - __lastvalue




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi Fowmy,

 

Thanks for this solution, this is really helpful! 

 

Regards,

 

Joep

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.