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
Multiverse_76
Frequent Visitor

LOOKUPVALUE pulling through blanks

Hi Datanauts

 

I'm struggling with a LOOKUPVALUE which is returning some blank values.  On research, I see that all of the criteria have to be met but I have double checked and the data is consistent.  I also read that I might need to use VALUES to force the whole table to be evaluated.  Any help to pull the missing values through would be greatly appreciated.

 

Forward Fees =
VAR EmployeeRows =
FILTER( 'Forward Fees', 'Forward Fees'[Consultant] = EARLIER( 'Master_Tbl'[MIS Name] ) )
VAR myEmp = CALCULATE(SUMX(FILTER(EmployeeRows, 'Forward Fees'[Consultant]<>BLANK()),'Forward Fees'[Future Fees]) )
RETURN
LOOKUPVALUE(
'Forward Fees'[Future Fees],
'Forward Fees'[Future Fees], myEmp,
'Forward Fees'[Consultant], 'Master_Tbl'[MIS Name]
)


This is where I'm going with it:

 

Master_Tbl

Master_table.png

And the relationships:

 

Schema.png

1 ACCEPTED SOLUTION

@v-frfei-msft  Thanks for being so ready to help.  I've actually solved the problem.  Seems I overbaked the formula which works perfectly without the LOOKUPVALUE part.

 

Forward Fees =

VAR EmployeeRows =
FILTER( 'Forward Fees', 'Forward Fees'[Consultant] = EARLIER( 'Master_Tbl'[MIS Name] ) )
VAR myEmp = CALCULATE(SUMX(FILTER(EmployeeRows, 'Forward Fees'[Consultant]<>BLANK()),'Forward Fees'[Future Fees]) )
RETURN
myEmp

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

Hi @Multiverse_76 ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft  Thanks for being so ready to help.  I've actually solved the problem.  Seems I overbaked the formula which works perfectly without the LOOKUPVALUE part.

 

Forward Fees =

VAR EmployeeRows =
FILTER( 'Forward Fees', 'Forward Fees'[Consultant] = EARLIER( 'Master_Tbl'[MIS Name] ) )
VAR myEmp = CALCULATE(SUMX(FILTER(EmployeeRows, 'Forward Fees'[Consultant]<>BLANK()),'Forward Fees'[Future Fees]) )
RETURN
myEmp
Greg_Deckler
Super User
Super User

You can generally use something like MAXX coupled with FILTER to replace LOOKUPVALUE and get a bit more control over what is happening.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.