Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

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.

8 Replies

  • v-henryk-mstf's avatar
    v-henryk-mstf
    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] ) )
    )


    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.

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      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's avatar
    AllisonKennedy
    Community Champion

    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)

    • Ruben28P's avatar
      Ruben28P
      Frequent Visitor

      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])))
       
       
       
      Muchas gracias.
      • AllisonKennedy's avatar
        AllisonKennedy
        Community Champion

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

  • v-henryk-mstf's avatar
    v-henryk-mstf
    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.

    • Syndicate_Admin's avatar
      Syndicate_Admin
      Administrator

      Good

      the specific expression of [Med_xG] :

      "Med_xG = SUM(xG_Partidos[xG])"
      Thanks a lot.