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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
tarmogolf
Advocate I
Advocate I

Calculation to show members with no value

Currently I have an Location Roster table with fields LocationName and DistrictName. I then have an Employee Roster table with an AssignedLocationName and EmployeeName, connected to the Location Roster table. Finally, I have a table with employee scheduling data that shows what location they are working at, and how many minutes they are scheduled to work by day. The model is working properly, for instance when I group by week number I can see how many minutes each employee is scheduled to work at:

 

tarmogolf_0-1654190718867.png

 

The issue I am having, though, is that in the above example there is actually a fourth employee, "Z", that is also assigned to this location, but has not had their schedule created. I would like to show "0" for each week where an employee is assigned to this location, but has no scheduling data available. Any thoughts? One "hack" that was suggested to me was simply doing something like this: 

Scheduled Minutes = SUM('Schedule & Time Clock'[Total Scheduled Shift Minutes])+0
 
but that ended up showing literally every employee in the company under every location.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@tarmogolf , There is one more, but that will also show all data (Show Item with Not data)

 

You have force remove additional data , example

 

0 between range
Measure = var _1= SUM('Schedule & Time Clock'[Total Scheduled Shift Minutes])+0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

 

 

ShowItemwithoutdata.JPG

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@tarmogolf , There is one more, but that will also show all data (Show Item with Not data)

 

You have force remove additional data , example

 

0 between range
Measure = var _1= SUM('Schedule & Time Clock'[Total Scheduled Shift Minutes])+0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

 

 

ShowItemwithoutdata.JPG

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

The "Show items with no data" option worked perfectly when I choose the employee field. I had *no* idea that option existed, thank you for showing me something new!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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