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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AvPowerBI
Post Patron
Post Patron

Working Days for Same Period Last Year

Hi,

 

I was given this DAX formula in my last post to calculate Working Days, I now need a new DAX formula for Working Days for Same Period Last Year but when I try to add this function SAMEPERIODLASTYEAR to the existing one it keeps erroring, below is my current one for Work Day:

 

Work Day = 
    COUNTROWS(
        FILTER(
                ADDCOLUMNS(CALENDAR(Min(Dates[Date]),Max(Dates[Date])),"WorkDay", 
                IF(
                    WEEKDAY([Date],2) < 6,1,0
                )
                        ),
                    [WorkDay] =1
                )
            ) + 0

 
 
Thanks
2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @AvPowerBI ,

 

Please try the following measure:

 

Working Days for Same Period Last Year = CALCULATE ( [Work Day], SAMEPERIODLASTYEAR ( Dates[Date] ) )

vkkfmsft_0-1648530769075.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

AvPowerBI
Post Patron
Post Patron

Anyone ideas on this one? Or is it not possible?

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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