Forum Discussion
Filter Only some Collumns with Calculate
- 10 months ago
Hi areias_br,
Thank you for reaching out to the Microsoft fabric community forum. I tried out the scenario using your data from the community, and it worked for me. I just tweaked the Dax and the relationship, and everything went smoothly.
Relationship:
outcome:
I am also including .pbix file for your better understanding, please have a look into it.Hope this clears it up. Let us know if you have any doubts regarding this. We will be happy to help.
Thank you for using the Microsoft Fabric Community Forum.
Hi,
Didn't work. Still not filtering.
HI areias_br
To make the measure return the correct result while keeping the calendar filter active, you can slightly adjust the DAX logic. The key is to preserve the date context from tb_calendario and only remove filters within 'Tabela_Ações' except for Task Owner and Action Type.
AcoesOverduePorDia =
VAR DataReferencia = MAX('tb_calendario'[Data])
RETURN
IF(
DataReferencia <= TODAY(),
CALCULATE(
COUNTROWS(
FILTER(
ALLEXCEPT(
'Tabela_Ações',
'Tabela_Ações'[Task Owner],
'Tabela_Ações'[ActionType]
),
'Tabela_Ações'[Data de Expiração] < DataReferencia &&
(
ISBLANK('Tabela_Ações'[Data de Fechamento]) ||
'Tabela_Ações'[Data de Fechamento] > DataReferencia
)
)
)
)
)
How this measure helps:
-
Keeps your calendar date filter active in visuals.
-
Counts actions that are overdue (expiration before the selected date) and still open.
-
Allows filtering by Task Owner and Action Type without breaking the logic.