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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to add a filter from another table to a measure created in the date table?

Hi,

 

I'm trying to set up a visual that would calculate the number of workdays depending on the country of origin.

 

I set up the following date table (attaching a printscreen of a specific instance where the number of workdays will be different between 2 countries).

 

AdamSem_0-1721664691709.png

 

I also set up a measure in the date table that would return the number of workdays for a given period but cannot seem to add a country filter (per Absentee ID located in another table).

 

AdamSem_1-1721664767067.png

 

The bar for Absentee ID 185 should be 0 as that ID is associated with the country SK and all 3 filtered dates are days off.


Can you advise how to best go about this?


Thanks,


Adam

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Anonymous 

I am glad to help you.  

 

According to your description, you want to know how to add a filter from another table to a measure created in the date table? 

 

If I understand you correctly, then you can refer to my solution. 

 

Your Measure doesn't filter for country, so it will return the same results regardless of the country associated with the absence ID. 

 

Since you didn't provide specific test data, I created a simple dataset based on your description: 

vfenlingmsft_0-1721700474272.png

 

vfenlingmsft_1-1721700474275.png

 

You can then try to rewrite Measure into the following formula: 

vfenlingmsft_2-1721700504052.png

 

TestWorkingDays = 
VAR SelectedCountry =
    SELECTEDVALUE ( 'AbsenteeTable'[Country] )
RETURN
    CALCULATE (
        COUNTROWS ( 'Date Table' ),
        'Date Table'[Working Day CZ] = 1
            && SelectedCountry = "CZ"
            || 'Date Table'[Working Day SK] = 1
            && SelectedCountry = "SK"
    )

 

Here is my test result: 

vfenlingmsft_3-1721700504061.png

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.


Best Regards,
Fen Ling,


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
Anonymous
Not applicable

Works perfectly. Thank you so much, @Anonymous!

Anonymous
Not applicable

Hi, @Anonymous 

I am glad to help you.  

 

According to your description, you want to know how to add a filter from another table to a measure created in the date table? 

 

If I understand you correctly, then you can refer to my solution. 

 

Your Measure doesn't filter for country, so it will return the same results regardless of the country associated with the absence ID. 

 

Since you didn't provide specific test data, I created a simple dataset based on your description: 

vfenlingmsft_0-1721700474272.png

 

vfenlingmsft_1-1721700474275.png

 

You can then try to rewrite Measure into the following formula: 

vfenlingmsft_2-1721700504052.png

 

TestWorkingDays = 
VAR SelectedCountry =
    SELECTEDVALUE ( 'AbsenteeTable'[Country] )
RETURN
    CALCULATE (
        COUNTROWS ( 'Date Table' ),
        'Date Table'[Working Day CZ] = 1
            && SelectedCountry = "CZ"
            || 'Date Table'[Working Day SK] = 1
            && SelectedCountry = "SK"
    )

 

Here is my test result: 

vfenlingmsft_3-1721700504061.png

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.


Best Regards,
Fen Ling,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.