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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

calculate working days for the displayed table visual

Hi all, 

 

I have a table of employees with thier sector and a calendar table. On my calendar table i have a column which return 0 for Holidays and weekends and 1 for workings days. 

 

I created a mesaure for return total workingdays 

 

WorkingDays= 
SUM( _calendar[working Days] ) 

 

 

However when i place a visual table or matrix and add the employee names + the measure and then select a mesure in the slicer the table is not being filtered with the selected sector, it still showing all employees. Although when i remove the measure it shows all employees related to the selected slicer. 

 

Waht i am trying to achive is: 

 

If i have 2 employees filtered and the month is 22 days working days, on the visual table or matrix will display 22 for each and 44 as total working days.

 

Any thoughts? 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi I found a soluction. 

 

I just created a second measure: 

 

WorkingDays2= 
Calculate( Values(calendar [Month]), workingdays)  

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Is there a relationship between your two tables? Can you create a sample .pbix file for us to test? Please don't contain any real data and sensitive information.

 

 

Best regards

Icey

Anonymous
Not applicable

Hi I found a soluction. 

 

I just created a second measure: 

 

WorkingDays2= 
Calculate( Values(calendar [Month]), workingdays)  

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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