cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
vitalicloud Frequent Visitor
Frequent Visitor

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! Smiley Indifferent

 

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter table but still show data for the column?

Hi @vitalicloud,

 

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.
2 REPLIES 2
Super User
Super User

Re: Filter table but still show data for the column?

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


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!


Community Support Team
Community Support Team

Re: Filter table but still show data for the column?

Hi @vitalicloud,

 

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.