cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gaborfromungarn
Helper I
Helper I

Focus on a time period selected by clicking the 2 endpoints

Hi,

Is it possible to "zoom" in between a specific period of time in a line chart?
For example.: data is between 2019.01.01 - 2019.12.31.
I would like to click on 2019.05.15 and 2019.05.25 on a chart and it'll just filter out those dates that are between them.

 

Thank you,

Gabor 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Gaborfromungarn,

Based on my test, it is impossible to achieve focus or highlight effect on line chart, you can use other type charts(column, bar charts) to achieve your requirement.

I'd like to suggest you create a new calendar table without relationship to original table records(use new calendar date as source slicer), then you can write a measure to compare selected date range and current table date and return conditional colors and enable conditional formatting on 'data color'.

Measure =
IF ( MAX ( 'Table'[Date] ) IN ALLSELECTED ( 'Calendar'[Date] ), "red", "blue" )

3.png

Result:

79.gif

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
AiolosZhao
Memorable Member
Memorable Member

Hi @Gaborfromungarn ,

 

As far as I know, the basic line chart don't have this filter function.

 

I'm not sure whether you know the basic "slicer" visualization of DATE type has this function.

 

You can try to create a slicer, then put your date column into it.

 

Then you can choose the type of slice to "BETWEEN" by clicking the "DOWN" button on the right top of the slicer.

 

Hope that can solve your problem.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi,

I understand that the slicer could solve the technical part of filtering,
however I might need an alternative chart that can solve this issue. 

 

Are there any chart types that I can use?

Thank you,

Gabor 

Helpful resources

Announcements
Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Ignite 2022

What's Next at Microsoft Ignite 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Top Solution Authors