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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dw700d
Post Patron
Post Patron

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
Super User
Super User

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
Super User
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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