Forum Discussion
Usix
9 months agoFrequent Visitor
Removefilters, all, keepfilters behavior
Hi all, I have 2 tables > Employees withs 2023 & 2024 salaries > a sample of employees ID on which I want to filter my visual Both have an active relationship on employee ID The visual I w...
- 9 months ago
Usix , All or remove filter should be used on a column in this case like
Same job family = CALCULATE(
[Evolution],
ALL('2023 2024'[Job Family])
))
KEEPFILTERS- Prevents CALCULATE from expanding the filter to ALL Job Families- refer -https://www.sqlbi.com/articles/using-keepfilters-in-dax/
for removing blank trySame job family = IF( ISBLANK(SELECTEDVALUE('emp filters'[ID])), BLANK(), CALCULATE( [Evolution], ALL('2023 2024'), KEEPFILTERS(VALUES('2023 2024'[Job Family])) ) )
amitchandak
Super User
9 months agoUsix , All or remove filter should be used on a column in this case like
Same job family = CALCULATE(
[Evolution],
ALL('2023 2024'[Job Family])
))
KEEPFILTERS- Prevents CALCULATE from expanding the filter to ALL Job Families- refer -https://www.sqlbi.com/articles/using-keepfilters-in-dax/
for removing blank try
Same job family =
IF(
ISBLANK(SELECTEDVALUE('emp filters'[ID])),
BLANK(),
CALCULATE(
[Evolution],
ALL('2023 2024'),
KEEPFILTERS(VALUES('2023 2024'[Job Family]))
)
)