Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello all,
I am trying to do an aggregation of transactions that happen between people and between a date range of 7 days.
I want this calculation to be done row-wise, meaning that every transaction will show a sum of transactions within the last 7 days.
Here is what the data looks like, and the final column is the output I am looking for.
See how for every record, the calculation sums all transactions within the last 7 days for that person.
Does anyone have any ideas? I have tried a few CALCULATE functions, and I don't see any posts similar to this. I'm sure there must be a way to do this.
Thank you
@CliffordAP , Not very clear, Try a measure like
calculate(sum(Table[Amount]), filter(Table, Table[Date] >=today() -7 && Table[Date] <=today()))
Ah, I do need to clarify.
I don't want the previous 7 days from today, I need the previous 7 days from the recorded date.
So for each record, the calculation will look into the previous 7 days from the recorded date and sum the transactions within those 7 days.
I'm getting something close with;
CALCULATE(SUM('table'[amount])
,ALLSELECTED()
,DATESBETWEEN('table'[Date],'table'[Date],DATEADD('table'[Date],-7,DAY)))
But it's not perfect..
Thank you for your response.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
12 |