cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dw700d
Helper V
Helper V

if column does not contain value then 0 between two tables

I have two tables. I have a table that identifies all Team “A” employees that work with Team “B”.  The second table shows all employees in team A, B & C. I created a relationship between the tables. That relationship is between the “Works with Team B” column and the “Employees” column. I then created a new table (Count of Employees table) that includes the “Employee” column from the All employees table and a “Count of works with Team B” column from the Team A employees working with team B table.

 

dw700d_2-1679324439933.png

 

 

This new table(count of Employees table) only shows me employees that have a count value greater than 0 in the “Count of works with Team B” column. I would like the new table to show me all employees and if the those employees do not have a value in the “count of works with team B” column the value should be 0. It should look like below

 

dw700d_1-1679324390262.png

 

How can I accomplish this with a Dax measure?

 

 

 

1 ACCEPTED SOLUTION
MohammadLoran25
Solution Sage
Solution Sage

Hi,

You need to follow these steps:

 

1-Add 0 to your Measure. It would be like this:

COUNT('Team A Employees Working with team B'[Works with team B])+0
 
2-Then in your visual, select the "Show Items With no Data". The Image is attached.
 tempsnip.jpg
 

If my answer solves your problem, please accept it as a solution so the others could find the answer easily.

Regards,

Loran

View solution in original post

1 REPLY 1
MohammadLoran25
Solution Sage
Solution Sage

Hi,

You need to follow these steps:

 

1-Add 0 to your Measure. It would be like this:

COUNT('Team A Employees Working with team B'[Works with team B])+0
 
2-Then in your visual, select the "Show Items With no Data". The Image is attached.
 tempsnip.jpg
 

If my answer solves your problem, please accept it as a solution so the others could find the answer easily.

Regards,

Loran

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors