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
Djam75
New Member

Segment date : start and end date

I have a Power BI report that includes a date segment visual based on a 'creationDate' column (in the 'Order' table) of date type. In the visual, the segment displays two dates: 'StartDate' and 'EndDate'.

How can I set it up so that, during the report display, the 'StartDate' field represents the start date of the current year (e.g., 01/01/2024), and the 'EndDate' is the maximum date from the 'Order.creationDate' column?

When I change the dates in the segment and validate, it propagates the filter to the visuals on the page that are linked to the 'Order.creationDate' column.

Thank you in advance for your help.

Djam75

2 ACCEPTED SOLUTIONS
v-xiandat-msft
Community Support
Community Support

Hi @Djam75 ,

Below is my table:

vxiandatmsft_0-1705024848369.png

I create a new table:

Table 2 = CALENDAR(2024,TODAY())

vxiandatmsft_1-1705024876617.png

The following DAX might work for you:

StartDate = STARTOFYEAR('Table 2'[Date])

EndDate = MAX('Table'[creationDate])

The final output is shown in the following figure:

vxiandatmsft_2-1705024933032.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

 A big thank you to Xianda Tang for your help, it has been very useful to me

View solution in original post

2 REPLIES 2
v-xiandat-msft
Community Support
Community Support

Hi @Djam75 ,

Below is my table:

vxiandatmsft_0-1705024848369.png

I create a new table:

Table 2 = CALENDAR(2024,TODAY())

vxiandatmsft_1-1705024876617.png

The following DAX might work for you:

StartDate = STARTOFYEAR('Table 2'[Date])

EndDate = MAX('Table'[creationDate])

The final output is shown in the following figure:

vxiandatmsft_2-1705024933032.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 A big thank you to Xianda Tang for your help, it has been very useful to me

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.