cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerOuzo
New Member

Calculated Column "Item has been booked in the past 3 months"

Hello together, 

 

I am currently building a Sales report and facing a problem. 

 

I don't know how to create a column which shows, if the item has been booked in the last three months. 

 

PowerOuzo_0-1633691116195.png

 

There are two tables: 

 

  • Projects
  • Time_entries

Every project can be booked multiple times. 

 

Thank you in advance for your help!

 

1 ACCEPTED SOLUTION
Natallia_23
Resolver I
Resolver I

Hello,

I did such example, 2 projects and several dates: 

Natallia_23_0-1633693671455.png

Natallia_23_1-1633693716437.pngNatallia_23_2-1633693756474.png

Booked = CALCULATE(MAXX('Date',IF(DATEDIFF('Date'[Date], NOW(), MONTH)<=3,1,0)), FILTER('Date', 'Date'[ID] = Project[ID]))

 

View solution in original post

1 REPLY 1
Natallia_23
Resolver I
Resolver I

Hello,

I did such example, 2 projects and several dates: 

Natallia_23_0-1633693671455.png

Natallia_23_1-1633693716437.pngNatallia_23_2-1633693756474.png

Booked = CALCULATE(MAXX('Date',IF(DATEDIFF('Date'[Date], NOW(), MONTH)<=3,1,0)), FILTER('Date', 'Date'[ID] = Project[ID]))

 

View solution in original post

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors