I’m struggling getting the right value to display for my report.
IF a single entity is selected I want that entity value to be returned as value (see. ex. in that attached) ; although it automatically selects a group > Secteur > Division > Consolidation.
If 2 entities are selected ex. 031 and 032 then I want these 2 values to show.
These are from a DIM_Entity table in which these 5 levels are into separate columns
It sounds like you’re trying to dynamically display selected values from a hierarchical slicer in Power BI. You can achieve this using DAX formulas that handle different selection scenarios.
Here’s a general approach:
Single Selection: Use SELECTEDVALUE() to return the selected entity.
Multiple Selections: Use CONCATENATEX() to display multiple selected values.
Display multiple selected entities separated by commas when more than one is selected.
For more details, you can check out discussions on hierarchies in slicers and selectedvalue() for titleshere and here. Let me know if you need further refinements!