Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 217069

How to calculate the moving total over a 14 day period when I have several groupings?

$
0
0

Hello,

 

I have a table that is currently formatted in this way:

 

CountryProductDateStore CentrePayment ProviderClientTransaction TypeTotalProject
USASKU1001/20/2017avisaab2repurchase14A
CanadaSKU1001/15/2017bmastercardab1initial15A
ItalySKU11012/5/2016avisaab4repurchase4C

 

I also have a DimDate table.

 

I would like to know how I can get the moving sum of all transactions (over 14 days) in the last column that match the day in the table. Unfortunately my attempt has not been very successful:

14 Days:=CALCULATE(sum('All Transactions'[total]),
ALL('DimDate'),
FILTER(ALL('DimDate'),'DimDate'[Date]>=MAX('DimDate'[Date])-14&&'DimDate'[Date]<=max('DimDate'[Date])
) , VALUES('All Transactions'[Country])
)

What this returns is just the last 14 days' total values (not as a running total either. Any ideas on how to address? 

 

Thanks. 


Viewing all articles
Browse latest Browse all 217069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>