Forum Discussion
Cumulative Line Target in Chart
I am tying to make a cumulative line target appear in the chart. The line must start with the value given by the measure and then it gets added by itself for each day. For example: if the target value in the first day is 5, for second day will be 10, the third will 15, and so on...
Here is the measure that I am currently using:
- Anonymous4 years ago
Hi Anonymous ,
Make sure the start measure always returns static value for each day.
Then rank the days on x-axis and multiply by [measure].
Cumulative_Target = [Measure]*RANKX(ALLSELECTED(Date_Table),CALCULATE(SELECTEDVALUE(Date_Table[day])),,ASC)Best Regards,
Jay
3 Replies
- claymcooperResolver II
Hi Anonymous,
Is the x-axis in your chart equal to Date_Table[Date_Column]? If not, try changing your calculation to:Cumulative_Target =CALCULATE(SUM(Meta_Comp_Alim[Meta_Alim_Diaria]),FILTER(ALLSELECTED(Date_Table),**x-axis value** <= MAX(**x-axis value**)))
Hope this helps!- AnonymousNot applicable
Thank you for your reply claymcooper .
The x-axis in the chart is not equal to Date_Table[Date_Column], but it's from the same table. Your suggestion won't work.
- AnonymousNot applicable
Hi Anonymous ,
Make sure the start measure always returns static value for each day.
Then rank the days on x-axis and multiply by [measure].
Cumulative_Target = [Measure]*RANKX(ALLSELECTED(Date_Table),CALCULATE(SELECTEDVALUE(Date_Table[day])),,ASC)Best Regards,
Jay