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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
giri41
Helper II
Helper II

calculate revenue when date in one table > date in another table

<HI Could someone help with the above issue please

Calculate(sum(revenue), appointment date> invoice date) not working

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @giri41 , 

I am not clear  about your design, you could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

If the appointment date, invoice date and revenue are in the same table(Suppose Table1) then the below measure would work:

= Calculate(sum(revenue), Filter(Table1,appointment date> invoice date))

sorry they are in two different tables

dax
Community Support
Community Support

Hi @giri41 , 

I am not clear  about your design, you could refer to my sample for details.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@giri41 , do they common dimension, where we can group and compare.

Refer this example of date diff, here you can compare or say datediff >0 or <0

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...

Hi Amit,

 

thanks for your reply.

 

do you mean

 

calculate( sum(sales), datediff(invoicedate, appointmentdate,days)>0) ?????????????

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.