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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Filter table but still show data for the column?

Hi,

Essentially I'm trying to filter the table to exclude data for a specific id, but still want to see that one of the rows has no data for the leftover id.

 

For that to make sense, let me illustrate:

 

This is the data:

201810161703.png

This is the table:

201810161704.png

 

As you can see there's no row with name "Test", which makes sense because there's no data for that for the remaining data after filtering.

Ideally, it would be great to still have "Test" next to "Hello" and "World" but to show either 0, or Null, or something along those lines.

 

I've attempted to create a new table:

201810161707.png

This one just has a list of all the possible "name"'s.

And what I did with this is created a relationship:

201810161708.png

 

And in my Power BI table, instead of using "name" from table vals I replace it with "name" from table types.

But, frustratingly, it is still showing the same result as previously! 😐

 

I feel like this is a very simple problem, but for some reason cannot get my head around it!

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

You could create the calculated table with the formula below.

 

table = VALUES(Table2[name])

Then create the relationship and create the measure.

 

Measure = var a= CALCULATE(SUM('Table2'[value]),FILTER('Table2','Table2'[some_id]=SELECTEDVALUE(Table2[some_id]))) return IF(ISBLANK(a),0,a)

Here is your desired output.

 

Untitled.png

 

More details, you could refer to the attachment.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

You could create the calculated table with the formula below.

 

table = VALUES(Table2[name])

Then create the relationship and create the measure.

 

Measure = var a= CALCULATE(SUM('Table2'[value]),FILTER('Table2','Table2'[some_id]=SELECTEDVALUE(Table2[some_id]))) return IF(ISBLANK(a),0,a)

Here is your desired output.

 

Untitled.png

 

More details, you could refer to the attachment.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

Did you click the drop down on "name" in the Values area and select "Show items with no data"?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors