The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
Any help is appreciated, thank you!
Solved! Go to Solution.
@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/
@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/
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"?
User | Count |
---|---|
61 | |
55 | |
53 | |
49 | |
30 |
User | Count |
---|---|
179 | |
87 | |
70 | |
48 | |
45 |