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
Anonymous
Not applicable

Issues with LOOKUPVALUE and CALCULATE FIRSTNONBLANK FILTER because reference table has multiple rows

Hi all,

 

I have a couple of tables:

 

1.png

 

2.png

 

I want to "transfer" ValueX from Table 2 to Table 1:

 

3.png

 

I tried this solution but it is not working. I think it's related to Table 2 having multiple rows (one per "Group") for the same time.

 

Thank you!

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @Anonymous , 

I think you could just create a relationship between two tables like below

591.PNG

 Then use these column in table directly, then it should work.

592.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
dax
Community Support
Community Support

Hi @Anonymous , 

I think you could just create a relationship between two tables like below

591.PNG

 Then use these column in table directly, then it should work.

592.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

az38
Community Champion
Community Champion

Hi @Anonymous 

what exactly solution did you use? if smth like

Valuex =
CALCULATE (
    FIRSTNONBLANK ( Table2[ValueX], 1 ),
    FILTER ( ALL ( Table2), Table2[Time] = Table1[Time] )
)

it should work. This IS the sense of FIRSTNONBLANK() function.

also, if all ValueX with the same time are equal you can use MIN, MAX, AVERAGE, like

Valuex =
CALCULATE (
    MIN( Table2[ValueX]),
    FILTER ( ALL ( Table2), Table2[Time] = Table1[Time] )
)

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
amitchandak
Super User
Super User

Try

new column in table 1 = maxx(filter(table2, table2[time]=table1[time]),table2[ValueX])

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.