cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gdps
Helper IV
Helper IV

Help with LOOKUPVALUE

Hello everyone,

 

I have two tables: TAB_Summary and TAB_Projects.

 

TAB_Summary

Project #StageDays in Stage
1Idea10
2Development15
3Launch20

 

TAB_Projects

Project #StageDays in Stage
1Idea10
2Idea10
2Development15
3Idea10
3Development14
3Launch20

 

I would like to obtain the Days In Stage value of TAB_Projects corresponding to the stage that the project in TAB_Summary is in.

 

For this, I thought of creating a calculated column using LOOKUPVALUE

 

 

Days in Stage = LOOKUPVALUE(TAB_Projects[Days in Stage],TAB_Projects[Project #],TAB_Summary[Project #],TAB_Projects[Stage],TAB_Summary[Stage])

 

 

But I'm getting the following error: "A table of multiple values was supplied where a single value was expected"

 

Any idea how to solve this problem?

 

Best Regards,

2 REPLIES 2
amitchandak
Super User IV
Super User IV

@Gdps , a new column in the summary table

Days in Stage = sumx(filter(TAB_Projects,TAB_Projects[Project #] = TAB_Summary[Project #] && TAB_Projects[Stage] =TAB_Summary[Stage] ),TAB_Projects[Days in Stage])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Greg_Deckler
Super User IV
Super User IV

@Gdps - Hard to be certain. The error you are getting is generally encountered when creating a measure and referencing columns without an aggregator. You can try the MAXX(FILTER(...),...) approach:

 

 

Days in Stage = MAXX(FILTER(TAB_Projects, TAB_Projects[Project #] = TAB_Summary[Project #] && TAB_Projects[Stage] = TAB_Summary[Stage]),TAB_Projects[Days in Stage])

 

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors