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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Add in line graph

Good, I'm working on a personal project, and I've stagnated in one step.

I intend to make a line graph where the values are increasing, which is shown as in the example.

fm21-expected-match-story.png

In my document I only managed to show it like this:

xg.png

Thanks a lot.

1 ACCEPTED SOLUTION

@Ruben28P  That looks good to me, is it giving the results you want? If so please mark it as a solution.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

8 REPLIES 8
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

What is the specific expression [Med_xG] created in your formula. In addition allselected function is relatively complex, it is recommended that the conversion formula be replaced by all function. Looking forward to your reply. 


Best Regards,
Henry


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

Good

the specific expression of [Med_xG] :

"Med_xG = SUM(xG_Partidos[xG])"
Thanks a lot.
v-henryk-mstf
Community Support
Community Support

Hi @Syndicate_Admin ,

 

My thoughts are similar to @AllisonKennedy . You can create the following measure statistics cumulative values instead of the fields in the original line chart visual. I did a test with the following reference:

M_1 =
CALCULATE (
    SUM ( 'Table'[Value1] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Score] <= MAX ( 'Table'[Score] ) )
)

vhenrykmstf_0-1644375605380.png


If the problem is still not resolved, please point it out. Looking forward to your reply.


Best Regards,
Henry


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

Good, I tried it but I can't do it, probably because I don't understand transcribing your nomenclature.

Do something similar, but I don't know if it's correct, because the "total" doesn't appear on the chart like you. CapOK.png

The measure you have passed me could be done with the names of my file?

Thanks a lot. Greetings.

AllisonKennedy
Super User
Super User

@Ruben28P  I think what you're looking for is a running total measure. 

 

Try something like:

VAR _time = MAX( xG_Partidos[Time] )

RETURN

Running Total xG = CALCULATE( SUM(xG_Partidos[xG] ) , xG_Partidos[Time] <= _time)


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hola @AllisonKennedy 

Probé con lo que me pusiste en la contestación, pero me salía error.

 

Esta puede ser una solución?

 

xG_Acumulado = CALCULATE(xG_Partidos[Med_xG] , FILTER(ALLSELECTED(xG_Partidos[Minuto]) , xG_Partidos[Minuto] <= MAX(xG_Partidos[Minuto])))
 
CapOK.png
 
 
Muchas gracias.

@Ruben28P  That looks good to me, is it giving the results you want? If so please mark it as a solution.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

lbendlin
Super User
Super User

Change your X axis type from categorical to continuous.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.