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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Multiple Values Needed

Hello!

 

Hoping the big brains on here can help me 🙂

 

Here is an example of my data:

 

ProductIDFacilitySkuSkuFacilityMadeInFacilityTransferFromSkuTransferFrom
6A12341234AY  
7B12341234BNA1234A
8C12341234CNA1234A
9D12341234DY  

 

I want to get a final column that looks like this:

 

ProductIDFacilitySkuSkuFacilityMadeInFacilityTransferFromSkuTransferFromTransferTo
6A12341234AY  BC
7B12341234BNA1234A 
8C12341234CNA1234A 
9D12341234DY   

 

I tried using this expression:

 

TEST = LOOKUPVALUE(Table[Facility],Table[SkuTransferFrom],Table[SkuFacility])
 
and got the error: A table of multiple values was supplied where a single value was expected.
 
Well, I want the multiple values please!!!
 
Thank you for your help
Jackie
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Are you sure? did you create a new column or new measure? this returns BC when used as a measure for me.

 

Anyway, for a column try this: 

TransferTo1 = 
calculate(
    CONCATENATEX(
        VALUES('Table'[Facility]);
        'Table'[Facility];
        ""
    );
    filter(
        all('Table');
        'Table'[TransferFrom]=EARLIEST('Table'[Facility])
    )
)

 

View solution in original post

5 REPLIES 5
jtownsend21
Responsive Resident
Responsive Resident

@Anonymous  Are you saying that there are instances where there should be more than one id in the TransferTo field? 

Anonymous
Not applicable

@jtownsend21 Yes, as in the example above the item transfers to two facilities (B and C) from A.

Anonymous
Not applicable

@Anonymous 

Can you use a measure or must it be a column?

 

Here is a measure:

TransferTo = 
calculate(
    CONCATENATEX(
        VALUES('Table'[Facility]);
        'Table'[Facility];
        ""
    );
    filter(
        all('Table');
        'Table'[TransferFrom]=SELECTEDVALUE('Table'[Facility])
    )
)

you can probably make something similar as a column if needed 🙂

Anonymous
Not applicable

@Anonymous Thank you for your help!  Unfortunately I am getting the result of ABCD instead of just BC for this particular SKU.  Any ideas?  Thanks again!

Anonymous
Not applicable

Are you sure? did you create a new column or new measure? this returns BC when used as a measure for me.

 

Anyway, for a column try this: 

TransferTo1 = 
calculate(
    CONCATENATEX(
        VALUES('Table'[Facility]);
        'Table'[Facility];
        ""
    );
    filter(
        all('Table');
        'Table'[TransferFrom]=EARLIEST('Table'[Facility])
    )
)

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.