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
Anonymous
Not applicable

rolling sum

Hello Community,

 

Hope you are well.

 

I need your help with the below challenge.

 

I want to produce a table at which :

  • Hard Benefit 1 : the total sum of per year will be the sum of the value of this year plus all the values of the previous ones
  • Hard Benefit 2 : same as above

For example, the correct answer to the question "what is the value of hard benefit 1 that the project PR1 has delivered in 2020?" will be 104+27, instead of 27.

 

Table 1 : Raw Data

ProjectYearHard Benefit 1Hard Benefit 2Hard Benefit 3
PR120191040108
PR120202741109
PR12021105670
PR22021886330
PR22022110079
PR32020985266

 

Table 2 : Desired Outcome

  20192020202120222023
PR1Hard Benefit 1104104+27104+27+105104+27+105104+27+105
 Hard Benefit 204141+6741+6741+67
 Hard Benefit 3108109000
PR2Hard Benefit 1008888+11088+110
 Hard Benefit 200636363
 Hard Benefit 300307979
PR3Hard Benefit 1098989898
 Hard Benefit 2052525252
 Hard Benefit 3066000

 

Hope my explanation makes sense.

 

Thank you in advance,

 

George

1 ACCEPTED SOLUTION

@Anonymous 

sry, I fixed this. Please see the attachment.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Anonymous 

please see the attachment. hope this is helpful.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hello @ryan_mayu 

 

Thank you for your reply. I noticed that your solution has an error. More specifically, it summarizes the values per year, but it ignors the breakdown per benefit type.

 

For example, the value of project PR1, hard benefit 1, year 2019 is 104. Your solution shows 212 instead, which is the sum of hard benefit 1 (value 104) and hard benefit 3 (value 108) for year 2019.

 

GeorgeGiannakis_0-1607611872406.png

Thank you,

 

George

 

@Anonymous 

sry, I fixed this. Please see the attachment.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hello @ryan_mayu ,

 

I really appreciate your quick response.

 

Your approach is perfect.

 

Please allow me one more question before I accept it as the solution. May I only ask if there is a way to produce the same solution, without the additional tables/relationships that you created?

 

Thank you,

 

George

@Anonymous 

yes, that was my first attempt.However I found what I got is not as same as what you need. So I tried another workaround to get your expected output.

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.