March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
Solved! Go to Solution.
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:
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
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.
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:
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
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:
Here is the link to the report:
https://drive.google.com/file/d/1bpO25Cqc7kfav-Y5NBP1cSXlSBM69Yul/view?usp=sharing
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |