Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hey, have a great year,
I would like to make a measure where I could have many filters and one of them based in two distinct tables as i show here:
Measure = CALCULATE( SUM('Caracterização Efetivo'[Número Empregados]), FILTER( 'Grupo Empregado', 'Grupo Empregado'[Código Grupo Empregado] IN {"B", "C", "L"} ), FILTER( 'Grupo Empregado', 'Grupo Empregado'[Código Subgrupo Empregado] IN {"B3", "B4", "B6", "B7", "C3", "C4", "C6", "C7", "L3", "B9", "C9", "L8", "L4"} ), FILTER('Grupo Empregado', 'Grupo Empregado'[Código Subgrupo Empregado] IN {"B5", "C5", "L5"} && CALCULATE( SUM('Caracterização Efetivo'[Número Empregados]), FILTER( 'Tipo Contrato', 'Tipo Contrato'[Código Tipo Contrato] = "73") )), FILTER( 'Unidade Organizacional', 'Unidade Organizacional'[Código Autoridade Controlo Efetivos] = "5" ), FILTER( 'Estado Ocupação', 'Estado Ocupação'[Código Estado Ocupação] IN {"1", "3"} ), FILTER( 'Caracterização Efetivo', 'Caracterização Efetivo'[ID_MES] = MAX('Caracterização Efetivo'[ID_MES]) ) )
It doesnt gives errors but doesnt retrive any type of errors.
I want to do a filter that only filters if he matches 2 conditions (and dont colapse other filters):
'Tipo Contrato'[Código Tipo Contrato] = "73"
and
'Grupo Empregado'[Código Subgrupo Empregado] IN {"B5", "C5", "L5"}
but they are from different tables.
This 3 tables are related with only 2 relationships:
Caracterização Efetivo -> (Many -to-one)Grupo Empregado with ID_GRUPO_EMPREGADO
Caracterização Efetivo -> (Many -to-one)Tipo de Contrato with ID_TIPO_CONTRATO
Instead of using FILTER you can use TREATAS
Personally I would create a variable for the MAX [ID_MES] to avoid any unintended context side effects. You can use EVALUATEANDLOG to see where your measure breaks down.
Can u help me more please?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Here is the sample data:
https://drive.google.com/file/d/1uhkfYWKn6Jkaip4Zh3j1ww2Ahb-w3ZCh/view?usp=sharing