Forum Discussion
admin11
Memorable Member
4 years agoError msg when i try to combine 2 column data into 1 column
Hi All Yesterday @ALLUREAN help me on below post https://community.powerbi.com/t5/Desktop/what-is-the-expression-for-BRAND-M/td-p/2256952 Today I try to create a expression :- SEGM...
- 4 years ago
Hi,
Try this calculated column formula
SEGMENT_M_1 = if(SALES[SOURCE]="LE"||SALES[SOURCE]="SD"||SALES[SOURCE]="PW"||SALES[SOURCE]="PM"||SALES[SOURCE]="DA",'SALES'[SEG] & LOOKUPVALUE(SEGMENT[SEGMENT_C],SEGMENT[SEG_RAW],SALES[SEG]),LOOKUPVALUE(SEGMENT[SEGMENT_C],SEGMENT[SEG_RAW],SALES[SEG]))
bcdobbs
Community Champion
4 years agoYou're getting the error because you're trying to combine two columns from different tables.
Assuming the tables are related:
Segment 1 => Many Sales
try the following dax:
SEGMENT_M = 'SALES'[SEG] & RELATED ( 'SEGMENT'[SEGMENT_C] )
admin11
Memorable Member
4 years ago
I try your propose expression :-
SEGMENT_M_ = 'SALES'[SEG] & RELATED ( 'SEGMENT'[SEGMENT_C] )
I get error msg below :-
The column 'SEGMENT[SEGMENT_C]' either doesn't exist or doesn't have a relationship to any table available in the current context.