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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
bernate
Helper III
Helper III

Measure to show all rows in table visual when other table doesn't have those values

Hello! I have 2 tables: Employees and Hours. I am trying to make a table visual to show Employees and their Hours Worked. 

 

Emplopyees are connected to Hours with Many-to-One on Employee ID, with many Employee IDs on the Hours table and no duplicate Employee IDs on the Employee table. 

 

Not every Employee has worked hours, so they will not appear on the Hours table. When I make a table visual, I add the Employee Name column from the Employee table and have 17 employees. I then add the Hours column from the Hours table, and my employee count drops to 9 because I have 8 employees who have not worked hours. 

 

I would still like to show those 8 employees on the table visual, but either with a 0 or Blank in the hours column. I know I can add a calculated column to the Employees table summing the hours from the Hours table, but can this be done with a measure instead? I tried IF(SUM('Hours'[Hours])=BLANK(),0,SUM('Hours'[Hours])), but this returns all employees and ignores the slicers I have on the page.

 

Thank you!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @bernate 

 

You can add 0 to a measure to force Power BI to show all rows. Example SUM('Hours'[Hours]) + 0

Or you can enable Show items with no data

danextian_0-1737861302129.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

4 REPLIES 4
danextian
Super User
Super User

Hi @bernate 

 

You can add 0 to a measure to force Power BI to show all rows. Example SUM('Hours'[Hours]) + 0

Or you can enable Show items with no data

danextian_0-1737861302129.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

This is exactly what I was looking for, thank you!

Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Measure = coalesce(SUM('Hours'[Hours]),0)

If this does not work, then share the download link of the PBI file.  Show the problem there clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.