FY2018  |  5  |  $2,960,378  |  $10,444,664   
FY2018  |  6  |  $1,487,671  |  $11,932,336   
FY2018  |  7  |  $1,423,357  |  $13,355,693   
FY2018  |  8  |  $2,057,902  |  $15,413,595   
FY2018  |  9  |  $2,523,948  |  $17,937,543   
FY2018  |  10  |  $561,681  |  $18,499,224   
FY2018  |  11  |  $4,764,920  |  $23,264,145   
FY2018  |  12  |  $596,747  |  $23,860,891   
FY2019  |  1  |  $1,847,692  |  $1,847,692   
FY2019  |  2  |  $2,829,362  |  $4,677,054   
FY2019  |  3  |  $2,092,434  |  $6,769,488   
FY2019  |  4  |  $2,405,971  |  $9,175,459   
FY2019  |  5  |  $3,459,444  |  $12,634,903   
FY2019  |  6  |  $2,850,649  |  $15,485,552   
FY2019  |  7  |  $2,939,691  |  $18,425,243   
FY2019  |  8  |  $3,964,801  |  $22,390,045   
FY2019  |  9  |  $3,287,606  |  $25,677,650   
FY2019  |  10  |  $2,157,287  |  $27,834,938   
FY2019  |  11  |  $3,611,092  |  $31,446,030   
FY2019  |  12  |  $2,624,078  |  $34,070,109   
FY2020  |  1  |  $3,235,187  |  $3,235,187   
FY2020  |  2  |  $4,070,046  |  $7,305,233   
FY2020  |  3  |  $4,429,833  |  $11,735,066   
FY2020  |  4  |  $4,002,614  |  $15,737,680   
FY2020  |  5  |  $5,265,797  |  $21,003,477   
FY2020  |  6  |  $3,465,241  |  $24,468,717   
FY2020  |  7  |  $3,513,064  |  $27,981,781   
FY2020  |  8  |  $5,247,165  |  $33,228,947   
FY2020  |  9  |  $5,104,088  |  $38,333,035   
FY2020  |  10  |  $3,542,150  |  $41,875,184   
FY2020  |  11  |  $5,151,897  |  $47,027,081   
FY2020  |  12  |  $4,851,194  |  $51,878,275   
  
##  Example 3 - visual calculation

The following visual calculation DAX query:

    
    
    TotalSalesRunningSumByYear = SUMX(WINDOW(0, ABS, 0, REL, ROWS, HIGHESTPARENT), [SalesAmount])
    

Returns the cumulative total sales by month, calculated along each year. The
values 1 and -2 could be used instead of HIGHESTPARENT, with the same results.

The screenshot below shows the visual matrix and the visual calculation
expression:

![DAX visual calculation](media/dax-queries/dax-visualcalc-window.png)

##  Example 4 - visual calculation

The following visual calculation DAX query:

    
    
    TotalSalesRunningSumByQuarter = SUMX(WINDOW(0, ABS, 0, REL, , -1), [SalesAmount])
    

Returns the cumulative total sales by month, calculated along each quarter.

##  Related content

[ INDEX ](index-function-dax)  
[ MOVINGAVERAGE ](movingaverage-function-dax)  
[ OFFSET ](offset-function-dax)  
[ ORDERBY ](orderby-function-dax)  
[ PARTITIONBY ](partitionby-function-dax)  
[ RANGE ](range-function-dax)  
[ RANK ](rank-function-dax)  
[ ROWNUMBER ](rownumber-function-dax) [ RUNNINGSUM ](runningsum-function-dax)

* * *

##  Feedback

Was this page helpful?

Yes  No

##  Feedback

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the
feedback mechanism for content and replacing it with a new feedback system.
For more information see: [ https://aka.ms/ContentUserFeedback
](https://aka.ms/ContentUserFeedback) .

Submit and view feedback for

This page

[ View all page feedback  ](https://github.com//issues)

* * *

##  Additional resources

[ California Consumer Privacy Act (CCPA) Opt-Out Icon  Your Privacy Choices
](https://aka.ms/yourcaliforniaprivacychoices)

Theme

  * Light 
  * Dark 
  * High contrast 

  *   * [ Previous Versions ](/en-us/previous-versions/)
  * [ Blog ](https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog)
  * [ Contribute ](/en-us/contribute/)
  * [ Privacy ](https://go.microsoft.com/fwlink/?LinkId=521839)
  * [ Terms of Use ](/en-us/legal/termsofuse)
  * [ Trademarks ](https://www.microsoft.com/legal/intellectualproperty/Trademarks/)
  * © Microsoft 2024 

##  Additional resources

###  In this article

[ California Consumer Privacy Act (CCPA) Opt-Out Icon  Your Privacy Choices
](https://aka.ms/yourcaliforniaprivacychoices)

Theme

  * Light 
  * Dark 
  * High contrast 

  *   * [ Previous Versions ](/en-us/previous-versions/)
  * [ Blog ](https://techcommunity.microsoft.com/t5/m