Skip to Content

Working Days for Current Month

In Webi, I'm trying to calculate the number of working days for the current month. Because we do not have this data available in SAP or in Webi, I'm using a work around by providing my own data source via excel and merging it with an active query from SAP.

I have uploaded an excel file in Webi with my Month/Year in one column (ex. MAR 2018) & the number of working days that corresponds to each month. I have merged it to my SAP query in Webi & it is working successfully.

I'm trying to pull the number of working days for the current month. It is Mar 2018 so I want my variable to pull the number of working days for MAR 2018. I'm using the below formula but it is totaling the working days for all of the months/years, not just MAR 2018:

=[Working Days] In([Current Month])

My [Current Month] variable is below & it is correctly pulling MAR 2018.

=Left(UserResponse("Fiscal Period (Single Value Mandatory)");8)

Any suggestions for how I can pull the working days for only the current month? This report will be automated & the current month working days will always need to populate on it's own.

I'm thinking the error may be in the Current Month Variable but I'm not sure what is causing it.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 06 at 07:20 PM

    try with creating Current month as detail variable and associate with the merged dimension.after that use in the formula. Assuming working days object is measure object.

    Add comment
    10|10000 characters needed characters exceeded

    • That was the missing piece. Thank you!

      I created a variable to convert the month name to a number.

      Next, I created another variable to determine the Max Month.

      Last, I updated my variable for Working Days for Current Month to:

      =[Working Days] Where(Right([Fiscal year/period];4)=[Max Year] And [Month Number]=[Max Month])

      It returns only the working days for MAR 2018.