locked
NUMBER DAY WORKING RRS feed

  • Question

  • Dear,

    The month have 30,31 days, except February.
    It's possible only show days business or working days.
    For example, 

    01 nov 2014 = 0
    02 nov 2014 = 0
    03 nov 2014 = 1
    04 nov 2014 = 2
    05 nov 2014 = 3
    06 nov 2014 = 4
    07 nov 2014 = 5
    08 nov 2014 = 0
    09 nov 2014 = 0
    10 nov 2014 = 6
    11 nov 2014 = 7
    .....

    The idea is to compare this month with any other month, but only days working.

    I'm working on PowerPivot and I'm trying to dax formulas.
    SWITCH (WEEKDAY ([Date]); 1; 0; 7; 0; 1)

    Thank you very much.
    Regards.

    • Edited by Jor85 Tuesday, November 25, 2014 2:20 PM
    Tuesday, November 25, 2014 2:14 PM

Answers

  • Best thing for this would be to maintain a calendar table and then include the information inside this. This would give you more flexibility to include things like your holidays also.

    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My MSDN Page
    My Personal Blog
    My Facebook Page

    • Proposed as answer by Olaf HelperMVP Tuesday, November 25, 2014 2:58 PM
    • Marked as answer by Charlie Liao Tuesday, December 2, 2014 9:53 AM
    Tuesday, November 25, 2014 2:34 PM
  • As Visakh indicated, the best bet is to maintain a calendar table.

    Here is a Power Pivot workbook and a simple SQL script from a technical training I did that will provide a starting point for a good calendar table. It should be trivial to add your column to either of these.

    • Marked as answer by Charlie Liao Tuesday, December 2, 2014 9:53 AM
    Tuesday, November 25, 2014 3:03 PM

All replies

  • Best thing for this would be to maintain a calendar table and then include the information inside this. This would give you more flexibility to include things like your holidays also.

    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My MSDN Page
    My Personal Blog
    My Facebook Page

    • Proposed as answer by Olaf HelperMVP Tuesday, November 25, 2014 2:58 PM
    • Marked as answer by Charlie Liao Tuesday, December 2, 2014 9:53 AM
    Tuesday, November 25, 2014 2:34 PM
  • As Visakh indicated, the best bet is to maintain a calendar table.

    Here is a Power Pivot workbook and a simple SQL script from a technical training I did that will provide a starting point for a good calendar table. It should be trivial to add your column to either of these.

    • Marked as answer by Charlie Liao Tuesday, December 2, 2014 9:53 AM
    Tuesday, November 25, 2014 3:03 PM
  • Thank Greg2178.

    Regards

    Tuesday, November 25, 2014 3:27 PM
  • Thank Visakh16.

    Regards

    Tuesday, November 25, 2014 3:28 PM