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! Learn more

Reply
Devender9999
Frequent Visitor

Revenue Calculations based on dates from another table

Hi,

I have two fact table one is Sales Table and other is Opportunity which has data of those customer and material which can become sales 

The modeling is 

Customer master /Material tables are connected to Sales table and to Opportunity table 

Now I am creating a table visual where having customer, material and opportunity close date and sales from sales table but to do that i have a condition that calculated sales from sales table when sales invoice date > opp closed date and before end date of the same year

But 
Dax which i am using 
Var _closedate = max(opp close date)
Var _enddateyear = date(year(_closedate),12,31)
return
calculate(sum(sales),invoice date>_closedate && invoice date<=_enddateyear)

Is not working 
I tried by created calculatetable function as well but didnt get.

can anyone please suggest something???

1 REPLY 1
Anonymous
Not applicable

Hi @Devender9999 ,

In order to better understand your demands and give the right solution, could you please provide some more specific information? such as your desensitized example data and a screenshot of your desired results?

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_Binbin Yu

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