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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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