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

Changing min and max on x-axis line chart

I'm creating a line chart with multiple values that show data from one project. There is a filter that selects a project and the values from that project are loaded into the chart (see below for chart and example data). I want the min and max of the x-axis of the chart always start and end with the values in the second table (ProjectStartDate and ProjectEndDate). Is this possible in Power BI?

 

Thank you in advance.

 

 

 

 

 

 

Screenshot_4.png Screenshot_2.pngScreenshot_3.png

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

We can use a measure like below in this scenario. Please give it a try. I assume there are three tables and proper relationships.

 

Demo Measure =
IF (
    MIN ( 'calendar'[date] ) < MIN ( 'project'[ProjectStartDate] )
        || MIN ( 'calendar'[date] ) > MIN ( 'project'[ProjectEndDate] ),
    BLANK (),
    SUM ( 'projectDetails'[Baseline] )
)

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-jiascu-msft,

 

Thank you for your response.

I understand that I can make a measure for the minimum and maximum.

 

But how can I apply this on the line-chart? I can't drag and drop a measure onto the property 'Start' or 'End' (see below).

 

 

Screenshot_5.png

Hi @Anonymous,

 

I am facing a similar challenge with some charts I am currently working on - just wondering were you ever able to resolve the issue about how to apply the measure against the line-chart with being able to drag and drop a measure onto the property 'Start' or 'End'?

 

Thanks,

Christine

Hi @Anonymous,

 

I would suggest you use a measure instead. If you set the property "Start" or "End", you can't make it dynamic. 

 

Best Regards,

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

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.