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
Artefact
Helper II
Helper II

SELECTEDVALUE doesn't work in own visual.

Hello,

When I am using SELECTEDVALUE in a DAX expression for a conditional formatted title, it won't work if I select an item in the visual itself. It only works when the selected item is selected in a slicer or filter.

For instance :  Title = SELECTEDVALUE(company[name]) works fine if I select a company name in a slicer. But if the company name is on the axis on the visual itself, the title stays empty.

Any solution? Thanks!

3 REPLIES 3
SteveCampbell
Memorable Member
Memorable Member

Yes, but I think this should be true. I had the same issue, and the conclusion is a graph does not filter itself. When you select a bar on a visual, you do not want it to affect the other bars.

In a visual, say a bar chart, each value is already filtered by the axis. For example, if we're showing sum of sales by company name, for each bar Power BI applies a filter by each company name, then the sum of sales. This would probably affect how selectedvalue works internally, I would imagine, as it would be difficult for the engine to process.

 

Maybe they will come with an altertnative in the future. For now, I would just make a put the dax measure,  Title = SELECTEDVALUE(company[name]), in a card above the visual.

 

 

 

Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png

Remember to spread knowledge in the community when you can! tu.png

 



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Anonymous
Not applicable

Can you please share an example file that exhibits this behaviour?

Thanks

Best
Darek

Hello Darek,

 

My question relates to the normal behaviour of the SELECTEDVALUE function. It behaves the same in all my datamodels and PBIX files. So you can easily recreate the example. Just make a measure
"title = SELECTEDVALUE(table[columnname]" , use it as a conditional formatted title in a visual.  Then put the columname in both a slicer and on the x-axis of the visual. When you select a value in the slicer, the title changes, but when you select a columnname on the x-axis on the visual, the title won't reflect your choice.

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