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
Sohan
Helper III
Helper III

Booking date filter

I have the following DAX formula which counts the number of appointments in the coming 6 months.

 

Sum of coming appointments = 
CALCULATE([Sum appointments],
          DATESINPERIOD(Calendar[Date],
                        LASTDATE(Calendar[Date]), 6, Month
                       )
         )

 

 

This DAX formula, when visualised with the Calendar[Date] field, produces the following:

Sohan_1-1663573251415.png

I would like there to be a filter on the Calendar[Date] field, which expresses that Appointment[Booking date] (for the sum) is not larger than the visualized date in Calendar[Date]. 

 

Essentially on a given date, I want a sum of the appointments in the coming 6 months, where the booking date is not larger than the starting date of the calculation.

 

As an example:

For January 2nd, I want the calculation period to be January 2nd - July 1st. The booking date should not be larger than January 2nd.

 

Does anyone know how this can be achieved?

 

Any help would be greatly appreciated!

2 REPLIES 2
amitchandak
Super User
Super User

@Sohan ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

refer this can help

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI


Appreciate your Kudos.

Hi @amitchandak I have edited the post. Does this clarify things for you?

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.