Forum Discussion

samuella's avatar
samuella
New Member
4 years ago
Solved

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

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity 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.