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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Syndicate_Admin
Administrator
Administrator

How can I make it take only the values that are not null?

I am measuring productivity and I have the units manufactured for each worker for each date, for which I create a graph that shows me the average productivity, and a letter that shows me the average of all workers.

foto bi.JPG

The issue is that it is not the real value for March since it takes into account dates in which it was not worked (examples Sunday and some Saturdays)

average average productivity per day = [average productivity day]/DISTINCTCOUNT('list of employees'[id])
average productivity day = SUM(Sheet1[Units])/(DISTINCTCOUNT(Sheet1[Date].[Day]))
It works well for me if in the filter I choose day by day, knowing the days that were worked but I need to select several months and calculate myself based on all the days that is not null / white
1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

Please try the following formula:

 

average productivity day = 
SUM ( Sheet1[Units] ) / CALCULATE ( DISTINCTCOUNT ( Sheet1[Date] ), Sheet1[Units] <> BLANK () ) 

vkkfmsft_0-1650333148316.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

 

Please try the following formula:

 

average productivity day = 
SUM ( Sheet1[Units] ) / CALCULATE ( DISTINCTCOUNT ( Sheet1[Date] ), Sheet1[Units] <> BLANK () ) 

vkkfmsft_0-1650333148316.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicate_Admin
Administrator
Administrator

I tried to create a new measurement with DISTINCTCOUNTNONULL(date) but I need you to use the date filter of the photo.

Is there a way to use a "slicer" as a filter for a measurement?

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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