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

How to Trim Line Chart Time Range to Show Past YTD Data Only

Hello,

 

Looking to see how to trim a date range automatically to show past year to date data only.

 

I have made a date table that I merged with my schedule completed job orders as I needed to set it up for a forecast.

 

My Y axis measure is now:

Job Order Measure = count(Merge1[scheduled_completion_date])+0
 
But I would like to trim the dates to show just the relevant data that is charted Past 365 days to date, currently it shows all data highlighted in red below.
 
I have tried adding a Min and Max Measure into my Tooltips, it is just not doing anything:
 
MaxMeasure = Max(Merge1[date_completed].[Date])
MinMeasure = Min(Merge1[date_completed].[Date])
 
Need help here, how do I trim the dates automatically?
TylerVono_0-1683646899187.png

 

Here is the current

Link: 

https://www.dropbox.com/s/gzw8bbffru08pbc/US%20Fabrication%20Outsource%20-%20Make%20To%20Buy%20Statu...

 

2 REPLIES 2
amitchandak
Super User
Super User

@TylerVono , try a measure like

 

Job Order Measure = if(max('Completed Jobs'[scheduled_completion_date]) >= [MaxMeasure] || max('Completed Jobs'[scheduled_completion_date]) <= [MinMeasure],blank(), count(Merge1[scheduled_completion_date])+0)

Hello Amitchandak,

So the measure works but its basically not capturing when the count is at 0, can you please let me know if there is another step?

 

JobOrderMeasure2 = if(max('Completed Jobs'[scheduled_completion_date]) >= [MaxMeasure] || max('Completed Jobs'[scheduled_completion_date]) <= [MinMeasure],blank(), count(Merge1[scheduled_completion_date])+0)
 

TylerVono_0-1683731983530.png

 

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.