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

use concatenate in measure

Hi,

I have two columns Major and Minor which needs to be concatenate and use that on creating a measure.

Table1

Major      Minor    Account1     Account2

100         001         500            300

200         002         400            200

 

Condtion for Measure is =if( concatenate(Major,Minor)='100001',Account1,Account2)

 

I have one calculated column=concatenate(Major,Minor)

But not able to use it in Measure. I tried to use selectedValue too but didn't work for me .

 

Is there a way to craete measure using concatenate?

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

First, you should know that:

1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result in a visual by its row context.

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

 

Second, for your requriement, you could use this formula to create a meausre

Condtion for Measure is = SUMX('Table',IF( CONCATENATE('Table'[Major],'Table'[Minor])="100001",'Table'[Account1],'Table'[Account2]))

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi @Anonymous 

First, you should know that:

1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result in a visual by its row context.

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

 

Second, for your requriement, you could use this formula to create a meausre

Condtion for Measure is = SUMX('Table',IF( CONCATENATE('Table'[Major],'Table'[Minor])="100001",'Table'[Account1],'Table'[Account2]))

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

It worked.Thank you.

az38
Community Champion
Community Champion

@Anonymous 

are you sure this doesnt work?

Measure is =
var _tmp = SELECTEDVALUE(Table[Major]) & SELECTEDVALUE(Table[Minor])
RETURN
if( _tmp ="100001", SELECTEDVALUE(Table[Account1]), SELECTEDVALUE(Table[Account2]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

If I use selectedValue function I need to bring Major and Minor columns to my report for Measure to work.

I am not supposed to bring Major and Minor to the report.

 

Thanks,

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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