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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.