Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Incremental line graph

Please could you help guiding me on this? 

 

At the moment I have: 

 

Total Incidents is DISTINCTCOUNT of report ID 

Total Incidents = DISTINCTCOUNT('Report_Incidents'[ID])+0

Month Name and FY are from the calendar table 

 

How do I make this line graph to appear incrementally for each year? 

Aug = Aug count

Sep = Aug + Sep counts

Oct = Aug + Sep + Oct counts 

...

 

Please please, thank you very much

6 Replies

  • CoreyP's avatar
    CoreyP
    Solution Sage

    I think you're looking for a cumulative sum. Try using the TOTALYTD function

    • Anonymous's avatar
      Anonymous
      Not applicable

      thank you, I will look at this function 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Tried TOTALYTD but I don't quite understand, however I came up with the below but I would like to have the Measure reset in Aug each year 

    Please thank you

    • CoreyP's avatar
      CoreyP
      Solution Sage

      Oh, if you want it to reset within a specific partition, check out the WINDOW function. https://learn.microsoft.com/en-us/dax/window-function-dax

      Example 2 should be quite useful:

      RunningSum = SUMX ( WINDOW ( 1, ABS, 0, REL, ALLSELECTED ( 'Date'[Fiscal Year], 'Date'[Month Number Of Year] ), PARTITIONBY ( 'Date'[Fiscal Year] ) ), [Total Sales] )

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you very much for your patience, my DAX knowledge is <0.  

        I will keep researching.

        Thanks again