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

Calculate a Measure based on list of names in another table.

Hi,

 

I know this may seem simple but is there any way to calculate an already existing measure with a filter based on another table?

 

I have 1 main table with 2 columns (types of Vehicles and 'Value 1' as a value for each vehicle) , with 3 accompanying tables (List A, List B, List C) in which each table contain a random list of the types of vehicles from the main table pool.

I would like to create a measure which is able to calculate the measure of the total sum of 'Value 1' for each list, showing the total of Value 1 for the types of vehicle that is listed in each list.

To Calculate the total sum of a'Value 1' is easy enough, I'm using the formula : CALCULATE (sum(Value 1),ALL(Vehicles)), However, I'm asking for help for the measure formula to calculate the total asum of 'Value 1', for instance, for each List A, List B, etc.

 

Please find the attached sample excel file as an explanation of the above.

https://docs.google.com/spreadsheets/d/1inXO-3bAK91QQg2R06kjninKlmFygQJX/edit?usp=sharing&ouid=11356...

Any help is appreciated, thank you!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@patrickrw99 , Assume you have column where we can use this list A from another table

 

CALCULATE (sum(Value 1),filter(Vehicles,Vehicles[Type] in values(Table2[List A] )))

 

of refer Treatas

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@patrickrw99 , Assume you have column where we can use this list A from another table

 

CALCULATE (sum(Value 1),filter(Vehicles,Vehicles[Type] in values(Table2[List A] )))

 

of refer Treatas

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

Thank you for the answer!

 

I would like to ask a follow up question, is it possible that if the lookup table (List A, List B, List C) have another column ('Input Month'), to further filter by this column? therefore, for example: the measure only calculate the Vehicles in List A which have the 'Input Month' Column value of "January"?

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.