Forum Discussion

kriderjo's avatar
kriderjo
New Member
2 years ago
Solved

Way to hide text until item is selected

I'm trying to create a "details" section for a report that shows data about a selected item using text box values. The issue is that when nothing--or a filter that results in more than one row--the text values default to the "first" item of the column, showing a colletion of random values not relevant to each other. Is there any way I could make the text blank/hide it somehow without having to add a row to the data source? 

 - Incorrect Values

 

- Correct Values

 

I'm open to creative ideas, aside from manipulating the data itself. I haven't been using PowerBI for very long so my scope is currently pretty narrow when it comes to fixing random little things like this.

 

  • You can create 'Calculate' measures that uses 'HASONEVALUE' on the project.
    Something like should work for you.

    Selected Customer =
    IF(
    HASONEVALUE('tableName'[ProjectColumn]),
    MIN('tableName'[CustomerColumn]),
    ""
    )
    

     

2 Replies

  • You can create 'Calculate' measures that uses 'HASONEVALUE' on the project.
    Something like should work for you.

    Selected Customer =
    IF(
    HASONEVALUE('tableName'[ProjectColumn]),
    MIN('tableName'[CustomerColumn]),
    ""
    )
    

     

    • kriderjo's avatar
      kriderjo
      New Member

      That works great, thanks for the help!