Forum Discussion

Simo2024's avatar
Simo2024
Frequent Visitor
2 years ago

DAX measure for report tooltip

Hi,
I am new to power BI and facing issues with a conditional tooltip.
I have a combined table with all the data I need. (see sample data bellow).

 

And I created a report gruoping the products by code and displaying the min, max and average unit price 

I want to be able to see the technical specification (could be one value or many) when I hover over the min or max values.
I have been testing few dax code to create a measure and use in the tooltip, but I couldn't get it to work.
Note that one code can have multiple technical specifications and unit costs, the logic I am using is e a condition combining  the code and unit price to display the coresponding technical specifications.

bellow is my latest attempt, that generates an error code (MdxScript(Model) (4, 1)

Tooltip =
VAR SelectedID = SELECTEDVALUE('Combined table'[code])
VAR SelectedValue = SELECTEDVALUE('Combined table'[Eur/Unit])
VAR Resulttable=
   CALCULATETABLE(
        'Combined table',
        'Combined table'[code] = SelectedID && 'Combined table'[Eur/Unit] = SelectedValue
    )
    RETURN
   VALUES('Combined table'[Technical specification])

Thank you in advance
Simo

2 Replies

    • Simo2024's avatar
      Simo2024
      Frequent Visitor

      Hi,
      Thank you for your reply and applogies if my question wasn't clear.
      I 'll try to explain it a bit further.
      The end result would be that if I hover over the min or max unit price in the report the tooltip would display all the technical specifications coresponding to the selected unit price and its code.

      Eg: if I hover over the unit price highlighted in red it should check the code highlighted in blue and unit price in the source table and display the technical specifications highlighted in green that match them.

       

      Thank you again