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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Invesco
Helper V
Helper V

Lookup Function to return max and or first occursance

Hi Experts

 

When using the following measure 

SLSL Name = LOOKUPVALUE(shc_shingrix_activity_volume_and_cf_days[slsl_name],shc_shingrix_activity_volume_and_cf_days[crm_call_name],dev_shc_shingrix_activity[crm_call_name])
 
I am getting the following error message: A table of multiple values was supplied where a single value was expected.
 
How can i modify the measure to return the either the max and or the first occurance, 
 
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Invesco,

lookupvalue function are used to search for values, the results can be single or list of values which can’t be stored in measure(measure only support aggregate values).
For this scenario, you need to add expression to convert them to single value at first:

SLSL Name =
LOOKUPVALUE (
    shc_shingrix_activity_volume_and_cf_days[slsl_name],
    shc_shingrix_activity_volume_and_cf_days[crm_call_name], dev_shc_shingrix_activity[crm_call_name],
    CONCATENATEX (
        VALUES ( shc_shingrix_activity_volume_and_cf_days[slsl_name] ),
        [slsl_name],
        ","
    )
)

LOOKUPVALUE function (DAX) - DAX | Microsoft Learn

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @Invesco,

lookupvalue function are used to search for values, the results can be single or list of values which can’t be stored in measure(measure only support aggregate values).
For this scenario, you need to add expression to convert them to single value at first:

SLSL Name =
LOOKUPVALUE (
    shc_shingrix_activity_volume_and_cf_days[slsl_name],
    shc_shingrix_activity_volume_and_cf_days[crm_call_name], dev_shc_shingrix_activity[crm_call_name],
    CONCATENATEX (
        VALUES ( shc_shingrix_activity_volume_and_cf_days[slsl_name] ),
        [slsl_name],
        ","
    )
)

LOOKUPVALUE function (DAX) - DAX | Microsoft Learn

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

Top Solution Authors