Forum Discussion

LucasMascarellD's avatar
LucasMascarellD
Frequent Visitor
3 years ago
Solved

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:

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

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

Someone can help me?

  • tamerj1's avatar
    tamerj1
    3 years ago

    LucasMascarellD 

    I think I initially misunderstood your requirement. Please try

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

6 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi LucasMascarellD 
    Please use

    =
    NETWORKDAYS (
        MIN ( Calendario[Date] ),
        MIN (
            MAX ( Calendario[Date] ),
            TODAY ()
        ),
        1,
        Feriados
    )
  • Didnt work
    The result:

    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.

    • tamerj1's avatar
      tamerj1
      Community Champion

       Please create a measure 

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

      and let me know what it returns. 

      LucasMascarellD

      • LucasMascarellD's avatar
        LucasMascarellD
        Frequent Visitor

        it´s return

         

        If I use this measure

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