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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.