cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlanP514
Helper IV
Helper IV

Dynamic Custom tooltip

Tooltip 2 =

var MySelection = SELECTEDVALUE('Year [Year sales])

return SWITCH(TRUE(),

MySelection="2019","2019 Cumulative",

MySelection="2020","2020 Cumulative",

MySelection="2021","2021 Cumulative",

MySelection="2022","2022 Cumulative",

MySelection="2023","2023 Cumulative",

MySelection="2024 ","2024 Cumulative",

"2019 Cumulative"

)


Hai All, I need your help on this, I had created a custom tooltip based on a single selection, and I need your help on Dax, when a user selects multiple selections, I want to make a custom tooltip based on multiple selections
Now Situation is like this
2019 ,2020,2021,2022,2023,2024 These are the slicers
and if the user selects 2019 custom tooltip will return “2019 cumulative”
The above one is correct but I want to add multiple selections as well

For e.g. If the user selects 2019 and 2020 I want to make a custom tooltip as 2019 && 2020 Cumulative
 If user select 2020 && 2021 == 2020 && 2021 Cumulative
if the user selects all options in slicer then All year cumulative

Please help
thanks

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AlanP514 , Create a measure like

 

Concatenatex(Year,Year [Year sales], ", ")  & " Cumulative"

 

or

 

 

Concatenatex(values(Year[Year Sales],Year [Year sales], ", ")  & " Cumulative"

 

if needed use sort order option



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@AlanP514 , Create a measure like

 

Concatenatex(Year,Year [Year sales], ", ")  & " Cumulative"

 

or

 

 

Concatenatex(values(Year[Year Sales],Year [Year sales], ", ")  & " Cumulative"

 

if needed use sort order option



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors