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

Displaying values in a range of dates within custom tooltip

Hello,

 

I have a line chart showing a value over time, and I would like my custom tooltip to display not only the value for the date that is hovered on, but also the previous and next week's values on a line chart. Any ideas on how to achieve this ?

 

Expected resultExpected result

 

Thanks in advance !

4 REPLIES 4
Anonymous
Not applicable

Hello,

I have still not been able to obtain the desired result. I have tried the suggested solutions, and spent some time trying to figure this out, but I am still stuck.

Using an unrelated date table prevents the date filter from passing to the tooltip and thus being able to display a range of date related to the value hovered on on the main graph. I would like to be able have the tooltip show the line value over - 1week and + 1 week interval relative to the date I hover on. 

Here is a link to a sample file if that can help:

.pbix file 

Thanks a lot,

Pierre

v-shex-msft
Community Support
Community Support

Hi @Anonymous,

I'd like to suggest you use not related date table field as the axis to design the report tooltip page.
Then you can write a measure on that visual to compare current value and selected value and apply filter effects. (use current date as conditions to filter on date week numbers)

Applying a measure filter in Power BI - SQLBI
Regards,

Xiaoxin Sheng

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

Hi  @amitchandak and thank your for your quick response,

 

I have created an independant Date table and added the "Week Rank" column.

I am trying to plot the "This Week" mesure against the Date from the new indendent date table in the tooltip, but it is not working. How is the filter supposed to be passed if the main graph date is not part of the filter expression of the measure used in the tooltip ? Sorry if I missed something.

amitchandak
Super User
Super User

@Anonymous , use this week vs last week using date table of week range

 

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))

 

 

If you want to show range as the filter is passed, you need to use independent date table in tool tip

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.

Top Solution Authors