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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

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:

 

Cumulative_Target =
CALCULATE(
SUM(Meta_Comp_Alim[Meta_Alim_Diaria]),
FILTER(
ALLSELECTED(Date_Table),
Date_Table[Date_Column] <= MAX(Date_Table[Date_Column])
)
)
 
The above measure will always give a constant value (because the table has values for the first day only)
AllaRN_0-1657638909836.png

 

1 ACCEPTED SOLUTION
Anonymous
Not 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)

vjaywmsft_0-1657853564500.png

 

Best Regards,

Jay

View solution in original post

3 REPLIES 3
Anonymous
Not 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)

vjaywmsft_0-1657853564500.png

 

Best Regards,

Jay

claymcooper
Resolver II
Resolver 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!
Anonymous
Not 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.

 

AllaRN_0-1657648237013.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.