Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

counting working days

Hi, I got my report where I ve a list of the company and each company has a column where is specified their country where they are located.

 

How I can create or import a calendar and create a measure for calculating the number of the working days specific for each country?

 

anybody can help?

9 Replies

  • mwegener's avatar
    mwegener
    Most Valuable Professional

    Hi Anonymous ,

     

    in ERP system Business Central (formerly Dynamics NAV), there is a Base Calendar Change table in which all nonworking days are stored with a recurring system, for each company.

    • mwegener's avatar
      mwegener
      Most Valuable Professional

      Hi Anonymous, 

       

      has your question been answered?

       

      Regards,

      Marcus

      Dortmund - Germany
      If I answered your question, please mark my post as solution, this will also help others.
      Please give Kudos for support.

      • Anonymous's avatar
        Anonymous
        Not applicable
        I don't have an erp system for count working days, I need to build on powerbi
  • mwegener's avatar
    mwegener
    Most Valuable Professional

    Hi Anonymous ,

     

    I have created an example for you.

    Define a base calendar code (possibly company)...

    ...and then the non working days for the base calendar.

    On this base, the PBIX determines the working days.

     

    You may download my PBIX and Excel file from here.
    Hope this helps.

     

    Regards,

    Marcus

    Dortmund - Germany
    If I answered your question, please mark my post as solution, this will also help others.
    Please give Kudos for support.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      mwegener 

      thanks for the solution provided i think might work, 

      I send you the data model ive in my report, the calendar table is created in Dax, not in query mode and there is the company table,

      I wish to calculate working days based on a country column in the company table since all companies in the same country will have the same working days could you help me using the attached PBI file to build the working days calculation?

       

      https://www.dropbox.com/s/7pw7fkn7u0w3xef/TEST.pbix?dl=0

      • mwegener's avatar
        mwegener
        Most Valuable Professional

        Hi Anonymous,

         

        try this.

        PBIX

        EXCEL

         

        Regards,

        Marcus

        Dortmund - Germany
        If I answered your question, please mark my post as solution, this will also help others.
        Please give Kudos for support.