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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
v-binbinyu-msft
Community Support
Community Support

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
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.