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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
buitrond
Frequent Visitor

Trendline of Percent Increase from Starting Year (3% Annually)

Hello hivemind, 

 

I am seeking to incorporate DAX measure solution to superimpose a dynamic trendline that takes the starting year value and projects a 3% increase annually from that base year.
Any insight will be appreciated. 

 

buitrond_0-1713885549154.png

 

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

Hi @buitrond 

 

I cannot open your link due to Security Policy. I have created a simple sample that I hope will help you.

 

My sample:

vxuxinyimsft_0-1713940034105.png

 

1. Create a calculated column as follows

Year = YEAR([Date])

 

2. Create a measure as follows

Measure = 
VAR _minYear = CALCULATE(MIN([Year]), ALL('Table'))
VAR _minSum = CALCULATE(SUM('Table'[value]), FILTER(ALL('Table'), [Year] = _minYear))
VAR _diff = MAX([Year]) - _minYear
VAR _result = _minSum + _minSum * _diff * 0.03
RETURN
_result

 

Result:

 

Select the Line and clustered Column chart visualization, and then place the measure into the Line y-axis

vxuxinyimsft_1-1713940169995.png

 

Best Regards,
Yulia Xu

 

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-xuxinyi-msft
Community Support
Community Support

Hi @buitrond 

 

I cannot open your link due to Security Policy. I have created a simple sample that I hope will help you.

 

My sample:

vxuxinyimsft_0-1713940034105.png

 

1. Create a calculated column as follows

Year = YEAR([Date])

 

2. Create a measure as follows

Measure = 
VAR _minYear = CALCULATE(MIN([Year]), ALL('Table'))
VAR _minSum = CALCULATE(SUM('Table'[value]), FILTER(ALL('Table'), [Year] = _minYear))
VAR _diff = MAX([Year]) - _minYear
VAR _result = _minSum + _minSum * _diff * 0.03
RETURN
_result

 

Result:

 

Select the Line and clustered Column chart visualization, and then place the measure into the Line y-axis

vxuxinyimsft_1-1713940169995.png

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you Yulia Xu; you have been very helpful.
This works brilliantly for the example I posted.
I subsequently added a group slicer to this report and tweaked your original DAX to dynamically reset the starting comparison value totals as slicer groups are selected:

buitrond_1-1713979304076.png

 

 

 




buitrond
Frequent Visitor

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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