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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Concatenate filtered values

Hi everybody,

I'm quite new to PowerBI and wasn't able to solve the following problem:

I have two tables (BeneficiariesIndicators and BeneficiaryIndicatorsName) that are related (1:n) through a primary key (ID resp. BeneficiaryIndicatorId):

JP_redcross_2-1595417442850.png

I would want to concatenate the IDCode with the IndicatorName in the table "BeneficiariesIndicators" (I've tried to create a new column in the table "BeneficiariesIndicators") but since the IndicatorName exists in 4 different languages, PowerBI doesn't know which value to select. The LanguageId I would want it to display is "1" (formatted as a whole number).

Any ideas?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MFelix 

Thanks again for your help. I've now solved it the "rookie way" 😉

 

1. I created a new table and linked it to the 'BeneficiariesIndicators' ->

BENI Name EN = filter('BeneficiariesIndicatorNames', [LanguageId]=1)

2. I looked up the IDCode ->

IDCode = LOOKUPVALUE(BeneficiariesIndicators[IDCode],BeneficiariesIndicators[Id],'BENI Name EN'[BeneficiariesIndicatorId])

3. I concatenated the IDCode & Name ->

Code & Name = [IDCode] & " - "& [IndicatorName]

View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @Anonymous ,

 

Try the following calculated column:

Beneficiaries_Indicator_Name =
CONCATENATE (
    'BeneficiariesIndicator'[IDCode];
    LOOKUPVALUE (
        'BeneficiariesIndicatorNames'[IndicatorName];
        'BeneficiariesIndicatorNames'[BeneficiariesIndicatorID]; 'BeneficiariesIndicator'[ID];
        'BeneficiariesIndicatorNames'[LanguageID]; 1
    )
)

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



Anonymous
Not applicable

Hi MFelix and thanks for your quick response! It would probably work if it wasn't for: "Function 'LOOKUPVALUE' is not allowed as part of calculated column DAX expressions on DirectQuery models.". Is there a way to work around this?

Hi @Anonymous ,

 

Did not know it was a direct query try the following code:

Column 2 =
CONCATENATE (
    'BeneficiariesIndicator'[IDCode];
    CALCULATE (
        MAX ( BeneficiariesIndicatorNames[IndicatorName] );
        FILTER (
            BeneficiariesIndicatorNames;
            BeneficiariesIndicatorNames[BeneficiariesIndicatorID] = BeneficiariesIndicator[ID]
                && BeneficiariesIndicatorNames[LanguageID] = 1
        )
    )
)

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



Anonymous
Not applicable

Hi @MFelix 

Thanks again for your help. I've now solved it the "rookie way" 😉

 

1. I created a new table and linked it to the 'BeneficiariesIndicators' ->

BENI Name EN = filter('BeneficiariesIndicatorNames', [LanguageId]=1)

2. I looked up the IDCode ->

IDCode = LOOKUPVALUE(BeneficiariesIndicators[IDCode],BeneficiariesIndicators[Id],'BENI Name EN'[BeneficiariesIndicatorId])

3. I concatenated the IDCode & Name ->

Code & Name = [IDCode] & " - "& [IndicatorName]

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors