Forum Discussion
Anonymous
4 years agoNot applicable
Multiple Conditions from Different Tables
Hello guys, I need to create a measure/column that is pulling items from three different tables: I need to calculate applications ID (from table 1) when the program is Computer (from table 2) or...
Anonymous
4 years agoNot applicable
HI Anonymous,
Did any update for these? If you want to calculate based on multiple table fields, it should be better to share the table structure and relationship mapping.
For example: these tables are linked based on application_ID fields.
measure =
VAR t2List =
CALCULATETABLE (
VALUES ( Table2[application_ID] ),
FILTER ( ALLSELECTED ( Table2 ), Table2[activity] IN { 1, 2 } )
)
VAR t3List =
CALCULATETABLE (
VALUES ( Table3[application_ID] ),
FILTER ( ALLSELECTED ( Table3 ), Table3[activity] = 3 )
)
RETURN
CALCULATE (
COUNTROWS ( VALUES ( Table1[application_ID] ) ),
FILTER (
ALLSELECTED ( Table1 ),
Table1[Program] = "1"
|| Table1[application_ID] IN UNION ( t2List, t3List )
)
)
Regards,
Xiaoxin Sheng