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
LucasMascarellD
Frequent Visitor

NETWORKDAYS PER MONTH DAX

HI,

I need to calculate the balance of working days for the current month and the number of working days for the following months,
I did this measure:

LucasMascarellD_0-1673713063156.png

It did´t work to calculante the balance of workings days for de current month, the result:

LucasMascarellD_1-1673713270133.png

In february it´s ok, but in january it´s need to return 12, today ( 01/14).

Someone can help me?

1 ACCEPTED SOLUTION

@LucasMascarellD 

I think I initially misunderstood your requirement. Please try

=
NETWORKDAYS (
MAX ( MIN ( Calendario[Date] ), TODAY () ),
MAX ( Calendario[Date] ),
1,
Feriados
)

View solution in original post

6 REPLIES 6
LucasMascarellD
Frequent Visitor

Didnt work
The result:

LucasMascarellD_0-1673783226415.png

With your measure is on the second line (teste3)

On first line (DiasUteis) I have the working days of the month, It is right.
But in January, needs to return 12, because we still have 12 days to the end of the month.

 Please create a measure 

    MIN (
        MAX ( Calendario[Date] ),
        TODAY ()
    )

and let me know what it returns. 

@LucasMascarellD

it´s return

LucasMascarellD_0-1673793476485.png

 

If I use this measure

LucasMascarellD_1-1673793674871.png

it´s return to me 12, but in other month returns 12 too and add a new column

LucasMascarellD_2-1673793833265.png

 

@LucasMascarellD 

I think I initially misunderstood your requirement. Please try

=
NETWORKDAYS (
MAX ( MIN ( Calendario[Date] ), TODAY () ),
MAX ( Calendario[Date] ),
1,
Feriados
)

My english is not the best, Maybe I didnt expresss my self inthe best way.

But the your measure works perfectly 

LucasMascarellD_0-1673794705005.png

It´s creating a new column with no title, Do you know why?

LucasMascarellD_1-1673794916638.png

 

tamerj1
Super User
Super User

Hi @LucasMascarellD 
Please use

=
NETWORKDAYS (
    MIN ( Calendario[Date] ),
    MIN (
        MAX ( Calendario[Date] ),
        TODAY ()
    ),
    1,
    Feriados
)

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.

Top Kudoed Authors