cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Madhumitha_V_
Helper II
Helper II

How to get the Annual benefit value for the left over months?

Calculation :

Assume a project has a “Total Benefit” per year of £120. The following table shows how to chart the annual benefit depending on the project completion date. Please help me on the DAX formula in achieving the annual benefits for the years 2022 to 2026.

 

Project completion date

2022

2023

2024

2025

2026

Notes

30Jun22

£60

£120

£120

£120

£120

Benefits start in July 22 = Six months of benefit in 2022 = (£120/12) x 6 = £60

31Oct22

£20

£120

£120

£120

£120

Benefits start in November 22 = 2 months of benefit in 2022 = (£120/12) x2  = £20

31Dec22

£0

£120

£120

£120

£120

Benefits start in January 23 = 12 months of benefit in 2023 = £120

31Mar23

£0

£90

£120

£120

£120

Benefits start in March 23 = 9 months of benefit in 2023 = (£120/12) x9  = £90

31Oct23

£0

£20

£120

£120

£120

Benefits start in November 23 = 2 months of benefit in 2023 = (£120/12) x2  = £20

 

Please help me in providing the DAX for the following requirement. It would be really helpful.

Thanks in advance !!

4 REPLIES 4
CNENFRNL
Super User
Super User

Tricky solution,

CNENFRNL_0-1646996617057.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is beyond their comprehension!

DAX is simple, but NOT EASY!

Hi @CNENFRNL ,

 

But where is the Total Benefits data? For every year, we will have a total benefit value. In an example which I have explained above has a Total Benefit of 120, from which we are calculating the Annual Benefits values.


Can you please help me with the DAX, by applying Total Benefits data as well

CNENFRNL_0-1647003289138.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is beyond their comprehension!

DAX is simple, but NOT EASY!

But this is not my expected answer.

Consider the INPUT data as below, where for each Actual date we will have Total benefits.

Actual DateTotal Benefits
01-01-223000
15-02-2220000
30-06-22617000
16-01-23220000
29-09-2380000
01-05-2440000
31-12-24120000

And now, the output should be as the below table,

Actual Date202220232024
01-01-22£2750.00£3000.00£3000.00
15-02-22£16666.67£20000.00£20000.00
30-06-22£308500.00£617000.00£617000.00
16-01-230£201666.67£220000.00
29-09-230£20000.00£80000.00
01-05-240£0.00£23333.33
31-12-240£0.00£0.00

 

Calculation should be, For 1st data (i.e) 01-01-22 , Benefits starts in Feb 22 = 11 months of benefit in 2022. Formula is - (Total Benefit for that date /12) x (Remaining months of benefit)

                                          (i.e) - (3000/12) x 11= 2750  -> This is for Year 2022

For 2023, we have all 12 months of benefit in 2023. So it should be 3000. (i.e) - 3000/12 x 12

 

Please help me in achieving this approach using DAX. Thanks in advance!!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 25

Ted's Dev Camp - August 25, 2022

Watch Session 25 of Ted's Dev Camp.

Top Solution Authors