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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.