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.
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!
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
Read my blogs on
Remember to spread knowledge in the community when you can!
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
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |