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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors