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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Block relational filter

Hello everyone,

 

How can I use the calculation of a measure without considering the filter of the relationship column between tables?

 

I have these two tables, Table Employee and Table Calendar.

 

1.JPG

Relationship:   Day Worked ------ Date

 

The Day Worked column contains only the days the employee worked

The Date column contains all days of the year.

The column Business day considers 1 being (Monday to Friday) and 0 being (Saturday and Sunday).

 

Using the Dax measure below, I can count the working days for each period of time, but I would like this value to be locked for each filtered employee.

 

Business day by Employee = CALCULATE(COUNT('Table Calendar'[Date]); 'Table Calendar'[Business day] = 1)

 

2.JPG

It is possible?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

Use the all formula on the calculation:

 

 

 

Business day by Employee = COUNTROWS(FILTER(ALLSELECTED('Table Calendar'); 'Table Calendar'[Business day] = 1))

 

 

Not on computer did this by heart may need some changes.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , if business day value is 1 and 0

the sum will give what you have in actual and the count will give what you have desired output

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AntrikshSharma
Super User
Super User

@Anonymous  Try this:

Business day by Employee =
CALCULATE (
    COUNT ( 'Table Calendar'[Date] ),
    'Table Calendar'[Business day] = 1,
    ALL ( TableEmploye )
)
Pragati11
Super User
Super User

Hi @Anonymous ,

 

Try modifying your dax as follows:

 

Business day by Employee = CALCULATE(COUNT('Table Calendar'[Date]); FILTER(ALL('Table Calendar'), 'Table Calendar'[Business day] = 1))

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

MFelix
Super User
Super User

Hi @Anonymous ,

 

Use the all formula on the calculation:

 

 

 

Business day by Employee = COUNTROWS(FILTER(ALLSELECTED('Table Calendar'); 'Table Calendar'[Business day] = 1))

 

 

Not on computer did this by heart may need some changes.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors