Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

using a calculated date field in another calculated measure

I have a table containing the Opportunities and Stage

 

I added a date column

NewDate = Date(Year(Opportunity[Close Date]),month(Opportunity[Close Date]),01)

 

Added a measure to compute min of  NewDate based on a filter

 

MinETCDate = CALCULATE(Min(Opportunity[NewDate]),Opportunity[StageNo]<> 0)

 

Added a meaure to compute maximum of NewDate based on a filter

 

MaxETCDate = CALCULATE(Max(Opportunity[NewDate]),Opportunity[StageNo]<> 0)

 

Computed the months in difference using 

 

MonthDiff = DATEDIFF([MinETCDate],[MaxETCDate],MONTH)

 

I have a measure of TotalWonValue defined as

 

TotalWonValue = CALCULATE( sum('Opportunity Details'[Total Price]),Opportunity[Opportunity Stage]="Closed - Won")

 

So far so good.

 

Now I want to find the TotalWonValue in the months provided by MonthDiff prior to the MinETCDate.   

 

I tried various combinations but with no success.

 

Any help would be appreciated.

 

Cheenu Sing

 

Upto this is fine.

1 REPLY 1
KumarDarmesh
Helper IV
Helper IV

Can you post any sample data?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors