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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.