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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Weird filter behavior

Hi guys, 

I am encountering a weird problem:
People work on certain "Incidents". I want to count how many incidents don't and do have booked hours.

The code I used is:


Count of I hours booked =
CALCULATE(COUNT(
Incidents[Incident ID*+]); FILTER(Hours; Hours[Number Of Hours] <> BLANK() ))


Hours.JPG

However, as you can see, only 19 incidents are reported as having no hours, whilst all these ID's do have hours.

What's wrong?

3 REPLIES 3
TomMartens
Super User
Super User

Hey,

 

without further knowledge about your data model especially the relationship between the tables 'Hours' and 'Incidents' it's difficult to provide any guidance.

 

I'm wondering about the large amount of "Number of Hours" without any Incident, maybe this indicated that the relationship between both tables does not find matching values. This can also explain the unexpected result of the measure. By the way, I'm not sure if the screenshot is showing the measure you have been created. The screenshot is showing "No hours booked" and the DAX snippet seems to create a measure called "Count of I hours booked".

 

Maybe you want to consider to create a pbix file that contains sample data but still represents your data model, upload the pbix file to onedrrive or dropbox and share the link. If you are using an Excel file to create your sample data, please upload this Excel file as well.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi Tom,

 

Thank you for the quick reply.

My bad, in the post I changed the name of the measure, but it is indeed the same (correct) one.
There are probably lots of incidents that do not have matching values, since not every hour that is booked is on an incident (other tables have other activities on which people book hours).

Please find below the relationship.

If you still need more info, I could send you a pbix file.

Thanks for the help!


relationship.png

Hey,

 

please upload the pbix file to onedrive or dropbox and share the link.

 

Thanks,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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