Forum Discussion
Making a dummy field so 'First Entry' title is descriptive
Hi,
I'm fairly new to Power BI so apologies if this has been covered elsewhere.
I have made visualisations that adapt according to a slicer, and have set the Title to be based on the field which is selected with that slicer. It works fine, except that when no field is selected on the slicer (i.e. showing all), it shows 'First Entry', which is obviously wrong, it should say 'All' or similar. I tried making a dummy row in the data with a descriptive title that should have come first in the list and would show when nothing is selected, but although this shows in the dataset in Power BI, it doesn't come up as an option. Does anyone have any solutions so that the visualisation title (or a text box if appropriate) shows the selected Field unless nothing is selected?
Many thanks
Hi samuella ,
According to your description, you can create a measure that displays the corresponding value when the field in the slicer is selected, otherwise it displays "All Category". See below:
Text_slicer = VAR sel_ = IF ( HASONEVALUE ( 'Table'[Category1] ), VALUES ( 'Table'[Category1] ), 0 ) RETURN IF ( sel_ = 0, "ALL Category", sel_ )
If the problem is still not resolved, please provide detailed error information and a screenshot of the desired result. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
samuella , Not very clear, Based on what I got. You need like
if(isfiltered(Table[Column]), selectedvalues(Table[Column]), "All")
refer if needed
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- v-henryk-mstf
Community Support
Hi samuella ,
According to your description, you can create a measure that displays the corresponding value when the field in the slicer is selected, otherwise it displays "All Category". See below:
Text_slicer = VAR sel_ = IF ( HASONEVALUE ( 'Table'[Category1] ), VALUES ( 'Table'[Category1] ), 0 ) RETURN IF ( sel_ = 0, "ALL Category", sel_ )
If the problem is still not resolved, please provide detailed error information and a screenshot of the desired result. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.