Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
| AccountId | Amount | Stage | Recurring | CloseDate | New Column |
| A | $10 | Closed Won | True | 2/1/22 | $5 - Previous Value (1/1/22) |
| B | $5 | Closed Won | False | 2/11/22 | blank -as not recurring and no prior value |
| A | $5 | Closed Won | True | 1/1/22 | $5 - Previous Value (12/1/21) |
| C | $50 | Closed Lost | True | 2/1/22 | blank - while recurring, stage is closed lost. |
| C | $100 | Closed Won | True | 1/1/22 | blank - no prior value |
| A | $5 | Closed Won | True | 12/1/22 | blank - no prior value |
Solved! Go to Solution.
@samdep , Try like
New column =
var _max = CALCULATE(MAX(Opportunity[CloseDate]),
FILTER(Opportunity, Opportunity[AccountId] = EARLIER(Opportunity[AccountId])
&& Opportunity[CloseDate] = EARLIER(Opportunity[CloseDate])
&& Opportunity[StageName] = "Closed Won"
&& Opportunity[Recurring__c] = TRUE()))
return
CALCULATE(Sum(Opportunity[Amount]),
FILTER(Opportunity, Opportunity[AccountId] = EARLIER(Opportunity[AccountId])
&& Opportunity[CloseDate] = _max
&& Opportunity[StageName] = "Closed Won"
&& Opportunity[Recurring__c] = TRUE()))
Thank you so much! This works perfectly!!
@samdep , Try like
New column =
var _max = CALCULATE(MAX(Opportunity[CloseDate]),
FILTER(Opportunity, Opportunity[AccountId] = EARLIER(Opportunity[AccountId])
&& Opportunity[CloseDate] = EARLIER(Opportunity[CloseDate])
&& Opportunity[StageName] = "Closed Won"
&& Opportunity[Recurring__c] = TRUE()))
return
CALCULATE(Sum(Opportunity[Amount]),
FILTER(Opportunity, Opportunity[AccountId] = EARLIER(Opportunity[AccountId])
&& Opportunity[CloseDate] = _max
&& Opportunity[StageName] = "Closed Won"
&& Opportunity[Recurring__c] = TRUE()))
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |