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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
owenmdavies
Frequent Visitor

Custom column/measure based on value in table

Hi

 

I have a table like this

Grid 1.PNG

The data for actual will be from another table and keyed on the Product/Colour

What is the best method to calculate the actual ?

 

Thanks in advance

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @owenmdavies,

 

If the target table only has one match record, I think lookupvalue should be simple to get result.

If it has multiple records can match the conditions, you can try to sumx function.

 

Sample:

Calculate column
Single= Lookupvalue(Target[Actual],Target[Product], Product[Product],Target[Color],Product[Color])
Total= SUMX(FILTER(ALL(Target),Target[Product]=EARLIER(Product[Product])&&Target[Color]=EARLIER(Product[Color])),[Actual])

 

 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @owenmdavies,

 

If the target table only has one match record, I think lookupvalue should be simple to get result.

If it has multiple records can match the conditions, you can try to sumx function.

 

Sample:

Calculate column
Single= Lookupvalue(Target[Actual],Target[Product], Product[Product],Target[Color],Product[Color])
Total= SUMX(FILTER(ALL(Target),Target[Product]=EARLIER(Product[Product])&&Target[Color]=EARLIER(Product[Color])),[Actual])

 

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.