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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Caitlin_Knox
Advocate III
Advocate III

Excluding weekends from performance metrics is

I know several posts have been made about this, and I have tried the strategies present in those threads. However, I'm still having issues. I think my problem is that I have the datekey of my dimension table constructed from the 'created' date, related to the datetable. The created date is part of my performance calculation and therefore the weekend exclusion is not necessarily checking each day from created to closed, but only if the created date is a weekend or not. How do I fix this? I created a sample file and attached it here, in case my summary is not clear enought. Thanks so much

 

sample file here

5 REPLIES 5
rahulbone
New Member

Never seen such an interesting article ever; thank you very much for the great stuff dear one.

http://uktvnowapk.ooo/

zoziano
Regular Visitor

try this function with some modification it will help you  Clean Master  Facebook Lite  Mathway

Chihiro
Solution Sage
Solution Sage

May be try something like below for calculated column?

=
IF (
    ISBLANK ( [Closed Date] ),
    COUNTROWS (
        FILTER (
            DimDate,
            [Date] >= 'sample data'[Created]
                && [Date] < TODAY ()
                && DimDate[DayOfWeekNumber] <> 7
                && DimDate[DayOfWeekNumber] <> 1
        )
    ),
    COUNTROWS (
        FILTER (
            DimDate,
            [Date] >= 'sample data'[Created]
                && [Date] < 'sample data'[Closed Date]
                && DimDate[DayOfWeekNumber] <> 7
                && DimDate[DayOfWeekNumber] <> 1
        )
    )
)
    + 0

 

 

@ChihiroThis is great, and much closer than I have gotten. However, the ouput is a whole number- as in it's not calculating from the date time values of the created and closed. Any ideas on how to get it to be more granular?

Hmm, I suppose you can use MOD(Now() - [Created], 1) and MOD([Closed Date] - [Created], 1), and add it back to respective calculation result (i.e True part & False part).

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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