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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Filtering a chart by the last date

Good morning, I'm trying to filter a line graph by the last date, which provides me with a date range filter. I would like the chart in this case to only appear values for 28/02/2022.

Alberto99_0-1647594721217.png

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Syndicate_Admin ;

Try to create a measure:

Flag = 
var _max= CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table'))
return IF(MAX('Table'[Date])=_max,1,0)

Then apply it into line chart.

vyalanwumsft_0-1647929912512.png

The final output is shown below:

vyalanwumsft_1-1647929962132.png


Best Regards,
Community Support Team _ Yalan Wu
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

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Syndicate_Admin ;

Try to create a measure:

Flag = 
var _max= CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table'))
return IF(MAX('Table'[Date])=_max,1,0)

Then apply it into line chart.

vyalanwumsft_0-1647929912512.png

The final output is shown below:

vyalanwumsft_1-1647929962132.png


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

amitchandak
Super User
Super User

@Syndicate_Admin ,

Create measure like this. or create a measure and use that as visual level filter

 

measure =

var _max = maxx(allselected(date), Date[Date])

return

calculate(countrows(Table), filter(Date, Date[Date] =_max))

 

Good, I've tried the formula you put on me and it gives me back an integer, not the maximum date for the range of values.

On the other hand what you tell me about putting it as a visual filter, what would the configuration be like?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.