cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors