Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

DAX remove filter and show missing record

Let me start with setting the setup of my model and data. Needless to say, this is a fictional modal, but it simulates the problem I am having in my actual PBI report. My actual report is based on a published dataset.

 

Model

jbas_0-1633428195710.png

 

Date dimension

jbas_1-1633428742603.png

 

PartyAnimal dimension

jbas_2-1633428773033.png

 

PartyRegistration fact

jbas_3-1633428812783.png

 

Below a mockup of the expected result of the report.

 

Expected result of report

jbas_4-1633429308751.png

 

The report has two slicers: on Month (of the Date dimension) and on BirthYear (of the PartyAnimal dimension).

 

I want to display two tables in the report. The first shows the names of the party animals and their fees. The table is filtered by the slicers, so it only shows the party animals that have registered in the selected month and of the selected birth year.

 

The second table should display all party animals that have registered in the selected month, but should ignore the selected birth year.

 

I have created a DAX expression to use in the second table:

 

 

CALCULATE([TotalFee], REMOVEFILTERS(PartyAnimal[BirthYear]))

 

 

 

This only gives me half of what I want. It does display the correct total, but it does not show the extra record. Below is the screenshot of the result of my report.

 

Actual result of report

 

jbas_5-1633429805370.png

 

My question

Is there a DAX expression that allows me to remove the filter context of a slicer, but also show the missing record?

 

I know that in this simple example it is possible to get the desired result with Edit Interactions to prevent the second table to interact with the BirthYear slicer. However, I would like to solve it with DAX to ensure reusability and because the original report is more complex.

 

Click here to download the PBIX.

1 ACCEPTED SOLUTION
PaulOlding
Solution Sage
Solution Sage

Hi @Anonymous 

 

This is auto-exist in action.  As ever, sqlbi have a good article explaining what's happening: https://www.sqlbi.com/articles/understanding-dax-auto-exist/ 

In short, as Name and BirthYear are on the same table the engine does an optimization to not evaluate combinations that don't exist after the filter is applied.

The suggested workaround is to snowflake the dimension - ie to move BirthYear to a separate table.

PaulOlding_0-1633439027950.png

You would hide BirthYear in the PartyAnimal table and use BirthYear from the BirthYear table in your slicer and measure

CALCULATE([TotalFee], REMOVEFILTERS(BirthYear[BirthYear]))

 That gets you your desired result.

PaulOlding_1-1633439254745.png

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks @PaulOlding, this solves the issue indeed.

PaulOlding
Solution Sage
Solution Sage

Hi @Anonymous 

 

This is auto-exist in action.  As ever, sqlbi have a good article explaining what's happening: https://www.sqlbi.com/articles/understanding-dax-auto-exist/ 

In short, as Name and BirthYear are on the same table the engine does an optimization to not evaluate combinations that don't exist after the filter is applied.

The suggested workaround is to snowflake the dimension - ie to move BirthYear to a separate table.

PaulOlding_0-1633439027950.png

You would hide BirthYear in the PartyAnimal table and use BirthYear from the BirthYear table in your slicer and measure

CALCULATE([TotalFee], REMOVEFILTERS(BirthYear[BirthYear]))

 That gets you your desired result.

PaulOlding_1-1633439254745.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.