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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
sparkplug93751
Helper II
Helper II

Filtering Out Weekends in Column

Hello,

 

I have a table that lists all clock ins/outs per person. There's less people working on the weekend but we still want them counted.

 

For our reporting, we use the average of the 5 weekdays.

 

The goal is to show a measure that is ALL days, including weekends, and a filter that will let you toggle between all days and turning off the weekend. 

 

I need it to look like: Remove Weekends? Where no is all days and yes removes the weekend to show just weekdays

 

Thanks!

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @sparkplug93751 

 

Based on your description, I created data to reproduce your scenario.

Table:

c1.png

 

Test:

c2.png

 

You may create a measure as below.

 

 

IsDisplay = 
var _flag = SELECTEDVALUE(Test[IsRemoveWeekend])
var _isworkday = WEEKDAY(SELECTEDVALUE('Table'[Date]))
return

    IF(
        _flag = "no",
        1,
        IF(
            _flag = "yes"&&NOT(_isworkday in {1,7}),
            1
        )
    )

 

 

 

You need to put the measure in the visual level filter and here is the result.

 

c3.png

c4.png

 

Best Regards

Allan

 

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

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @sparkplug93751 

 

Based on your description, I created data to reproduce your scenario.

Table:

c1.png

 

Test:

c2.png

 

You may create a measure as below.

 

 

IsDisplay = 
var _flag = SELECTEDVALUE(Test[IsRemoveWeekend])
var _isworkday = WEEKDAY(SELECTEDVALUE('Table'[Date]))
return

    IF(
        _flag = "no",
        1,
        IF(
            _flag = "yes"&&NOT(_isworkday in {1,7}),
            1
        )
    )

 

 

 

You need to put the measure in the visual level filter and here is the result.

 

c3.png

c4.png

 

Best Regards

Allan

 

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

Greg_Deckler
Community Champion
Community Champion

Use WEEKNUM([Column],2) and you wan those < 6. See https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/m-p/367362#M109



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi, so when I use this in a slicer. How would I structure it?

 

Would it be the dax you sent where those less than 6 are "Yes" and Those not are "No"? 

 

I need the Yes option to show all 7 days and the No option to Only show the 5 workdays. I've isolated the weekend with a yes no using weekday but when the answer is "Yes" it only selects those that are Saturday or Sunday vs all 7 days

 

Thanks!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.