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
rintoalappat
Frequent Visitor

Need to pass date value to tooltip but not all visual in tooltip

Hi,

 

This is my first post. I'm working on Tableau to Power BI migration.

I have a scenario where we have a line graph and when we hover on any month, it will show a tooltip with full sales trend and value of that sales value for that particular month. 

 

I createded the tooltip but if i turn on the tooltip "filter all values", the trend shows only one month of data which I'm hovering. But if if I turn off "Filter all values" Im getting proper trend Data but for that selected month is not populating data.

 

If I keep "Filter all" then I get only hoveringm onth trend and sales on card.

rintoalappat_0-1695408251761.png

If I turn off "Filter All", I get the trend, but the month's sales is aggregated to all months, not the one I'm overing on the line. 

rintoalappat_1-1695408289992.png

 

Requirement is to show the hovering month's sale on the card and show full sales trend. Im new to power bi, please help any solution. Thanks in advance,

 

Regards,

Rinto

 

 

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

Hi @rintoalappat ,

 

Open "Keep All Filters".

We can create a new table.

Table 2 = 'Table'

vtangjiemsft_0-1695714087149.png

We can create a measure.

Month sales = CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),YEAR('Table'[Date])=YEAR(MAX('Table'[Date])) && MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))))

vtangjiemsft_1-1695714203411.png

Best Regards,

Neeko Tang

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

6 REPLIES 6
v-tangjie-msft
Community Support
Community Support

Hi @rintoalappat ,

 

Open "Keep All Filters".

We can create a new table.

Table 2 = 'Table'

vtangjiemsft_0-1695714087149.png

We can create a measure.

Month sales = CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),YEAR('Table'[Date])=YEAR(MAX('Table'[Date])) && MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))))

vtangjiemsft_1-1695714203411.png

Best Regards,

Neeko Tang

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

v-tangjie-msft
Community Support
Community Support

Hi @rintoalappat ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1695627791116.png

(2) We can create a measure. 

Month sales = CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),YEAR('Table'[Date])=YEAR(MAX('Table'[Date])) && MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))))

(3) Then the result is as follows.

vtangjiemsft_1-1695627837254.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

@v-tangjie-msft Thank you. Source data is same.  but I need to show the full sales trend on the chart as well. Issue is that when I hover on the main line chart, its filtering the tooltip trend chart as well with the specific month. but if I turn off "Filter all" then Im getting full sales trend on tooltip but the Sales Card visual is showing for all months.

123abc
Community Champion
Community Champion

It seems like you're facing a challenge with creating a tooltip in Power BI that displays both the sales trend for the selected month and the sales value for that specific month. To achieve this, you can use a combination of measures and visual-level filters. Here's a step-by-step guide:

  1. Create a Tooltip Page:

    • Go to the "View" tab in Power BI.
    • Click on "Tooltip" to create a new tooltip page.
  2. Design the Tooltip Page:

    • On the tooltip page, you can design the visualizations as you want, including a card visual to display the sales value for the selected month and a line chart to show the full sales trend.
  3. Create Measures:

    • You'll need to create two DAX measures:
      • One measure to calculate the total sales for the selected month. Let's call it "Selected Month Sales."
      • Another measure to calculate the total sales for all months. Let's call it "Total Sales."
  4. Set up Visual-Level Filters:

    • Go back to your main report page.
    • Select the line chart where you want to display the full sales trend.
    • In the "Visualizations" pane on the right, go to the "Filters" section.
    • Add a visual-level filter that filters the data for the selected month based on your line chart's interaction with other visuals. This filter should filter the data by the month you're hovering over.
  5. Configure Tooltip:

    • Go to the "Format" pane.
    • Expand the "Tooltip" section.
    • Turn on the "Tooltip" toggle.
    • In the "Page Information" dropdown, select the tooltip page you created in step 1.
  6. Edit Tooltip Page Interaction:

    • Click on the tooltip page in the "Pages" pane.
    • Set the "Page Information" to "None" for the line chart that displays the full sales trend. This ensures that this visual will always display the full trend, regardless of the selected month.
  7. Edit Tooltip Page Interaction (Continued):

    • For the card visual that displays the sales value for the selected month, set the "Page Information" to "Tooltip." This will make sure this visual updates based on the selected month when you hover over the line chart.
  8. Test the Tooltip:

    • Go back to your main report page and hover over the line chart to see if the tooltip displays the sales value for the selected month and the full sales trend.

By configuring the tooltip page and visual-level filters, you should be able to achieve the desired behavior of showing the hovering month's sales on the card while displaying the full sales trend. This approach allows you to have more control over what is displayed in the tooltip for different scenarios.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos .

@123abc  Thank you for taking time to answer. Do you want me to create any specific DAX calculation. Its not mentioned in your answer. I will follow the rest and will let uou know

You're welcome! To achieve the functionality described in your question, you typically don't need any specific DAX calculations. The approach outlined in my previous response focuses on configuring the visuals and interactions within Power BI without requiring custom DAX calculations.

However, if you have additional calculations or transformations specific to your data that you want to include in your report, you can certainly use DAX for that purpose. For example, if you need to create calculated columns or measures for certain calculations, you can do so in the Power BI Data Model using DAX.

If you have specific calculations or requirements related to your data that you'd like assistance with, please provide more details about them, and I'd be happy to help you with the DAX formulas or expressions needed to achieve those specific calculations.

 

But if you want any DAX formulas please explain your issue in detail.

 

Regard:

ali Abbas

 

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