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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
realdaniel1989
Frequent Visitor

Need Help: Yearly step-down calculation based on a fixed percentage

Hi, 

 

I'm new to DAX and I need help with coming up with a DAX computation

 

The scenario here is that at the start of each new year from [Period No.] = 8 onwards, I need to compute a degredation.  

 

The first year (ie. [Period No. = 8]), there will be no degredation therefore 100% but in subsequent years, there will be a degredation of 0.7% p.a.  and this degradation will only happen at the start of the year.  

 

Please help on what DAX expression should be written to achieve the results above. 

 

Thanks

 

YearYear. NoPeriod No.Start dateEnd dateDegredation
2018111-Apr-1830-Jun-18 
2018121-Jul-1830-Sep-18 
2018131-Oct-1831-Dec-18 
2019241-Jan-1931-Mar-19 
2019251-Apr-1930-Jun-19 
2019261-Jul-1930-Sep-19 
2019271-Oct-1931-Dec-19 
2020381-Jan-2031-Mar-20100.0%
2020391-Apr-2030-Jun-20100.0%
20203101-Jul-2030-Sep-20100.0%
20203111-Oct-2031-Dec-20100.0%
20214121-Jan-2131-Mar-2199.3%
20214131-Apr-2130-Jun-2199.3%
20214141-Jul-2130-Sep-2199.3%
20214151-Oct-2131-Dec-2199.3%
20225161-Jan-2231-Mar-2298.6%
20225171-Apr-2230-Jun-2298.6%
20225181-Jul-2230-Sep-2298.6%
20225191-Oct-2231-Dec-2298.6%
20236201-Jan-2331-Mar-2397.9%
20236211-Apr-2330-Jun-2397.9%
20236221-Jul-2330-Sep-2397.9%
20236231-Oct-2331-Dec-2397.9%
20247241-Jan-2431-Mar-2497.2%

 

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@realdaniel1989 

 

You may use DAX below to add a calculated column.

Column =
VAR p = 'Table'[Period No.] - 8
RETURN
    IF ( p >= 0, 1 - QUOTIENT ( p, 4 ) * 0.7 / 100 )

 

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

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@realdaniel1989 

 

You may use DAX below to add a calculated column.

Column =
VAR p = 'Table'[Period No.] - 8
RETURN
    IF ( p >= 0, 1 - QUOTIENT ( p, 4 ) * 0.7 / 100 )

 

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

Probably something like:

 

Degradation = 
VAR __period = [Period]
VAR __degradation = 
    IF([Period] < 8,
        BLANK(),
        INT( (__period - 😎 / 4) * .7
    )
RETURN 100 - __degradation

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

Degredation.jpg

This error shows up 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.