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
Anonymous
Not applicable

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]))

 

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.