Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
NumeritasMartin
Frequent Visitor

Return a text value

Hello All,

 

After a little break from PBI I am trying to make a simply dashboard which is mostly working except for the text elements. I want to show the sector of a company, but am either returning an error or the column header as opposed to data. The structure of the table looks as below.

 

The measure I am trying to get to work looks as follows:

 

Sector = VAR SelectedAsset = SELECTEDVALUE('Values'[Asset])
RETURN
   IF(
          ISFILTERED('Values'[Asset]) && NOT(ISBLANK(SelectedAsset)),
          CALCULATE(
          VALUES('Values'[Profile]),
          'Values'[Asset] = SelectedAsset
),BLANK()

)

 

_Measure_Year_Period_Day_Fund_Asset_Profile_Version_Account_Currency_value
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloCompany NameActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloDeal LeaderActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloIndustryActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloSectorActualUndefinedUndefinedText I want to return
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloBusiness Description (Long)ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloHeadquartersActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloGeographyActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloOperationsActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloWebsiteActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloReporting CurrencyActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloStock TickerActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloAcquisition DateActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloAsset StatusActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloBusiness Description (Short)ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloExit multiple of cost - Manager's Current EstimateActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloExpected Exit DateActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloITES - Paragraph 1ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloITES - Paragraph 2ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloITES - Paragraph 3ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloITES - Paragraph 4ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloITES - Paragraph 5ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloITES - Paragraph 6ActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloLead FundActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloLocal CurrencyActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloLocal Currency - ActualActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloLocal Currency - FlashActualUndefinedUndefinedSample data
Meta DataUndefinedUndefinedUndefinedUndefinedCampagnoloNumber of EmployeesActualUndefinedUndefinedSample data
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @NumeritasMartin ,

Please update the formula of your measure [Sector] as below and check if it can return your expected result...

Sector =
VAR SelectedAsset =
    SELECTEDVALUE ( 'Values'[Asset] )
RETURN
    IF (
        ISFILTERED ( 'Values'[Asset] ) && NOT ( ISBLANK ( SelectedAsset ) ),
        CONCATENATEX (
            FILTER ( 'Values', 'Values'[Asset] = SelectedAsset ),
            'Values'[Profile]
        ),
        BLANK ()
    )

If the above one can't help you get the expected result, please provide some raw data in your table 'Values' (exclude sensitive data) with Text format and your expected result. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @NumeritasMartin ,

Please update the formula of your measure [Sector] as below and check if it can return your expected result...

Sector =
VAR SelectedAsset =
    SELECTEDVALUE ( 'Values'[Asset] )
RETURN
    IF (
        ISFILTERED ( 'Values'[Asset] ) && NOT ( ISBLANK ( SelectedAsset ) ),
        CONCATENATEX (
            FILTER ( 'Values', 'Values'[Asset] = SelectedAsset ),
            'Values'[Profile]
        ),
        BLANK ()
    )

If the above one can't help you get the expected result, please provide some raw data in your table 'Values' (exclude sensitive data) with Text format and your expected result. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

MFelix
Super User
Super User

Hi @NumeritasMartin ,

 

The example is not explicit enough can you give some more insights on what you are trying to achieve.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.