Posts

Showing posts from October, 2020

What is fiscal calendar?

Image
 What is the fiscal calendar?  A fiscal calendar is used for financial reporting by the business. Because the nature of the business varies, the business cycle is different. The fiscal calendar is the time interval for the company to determine its own income and expenses for a year according to accounting and taxation standards. The year must be twelve months. It is the time limit reflecting the financial status and operating results of the unit. For example, the school year starts in September and ends in August of the following year.  The advantage of the fiscal calendar is that any day of the 365 days a year can be used as the beginning of the fiscal year.  How to define the fiscal quarter?  We can customize the week of each month according to company needs. For example, for a typical retail calendar, each quarter has 4 weeks in the first month, 5 weeks in the second month, and 4 weeks in the third month. There are 13 workweeks in one season, that is, 7x13 = ...

Using PySpark to get holidays in Incorta

Image
The hardest part when I was working on a Date table was finding the holidays. Next, I will tell you how to use Pyspark to find holidays in Incorta. I find this package that is very useful for me.  Python holidays library  

Using PySpark to make Date table in Incorta

Image
Date dimension almost exists in all analytics solutions to allow navigation of the fact table through familiar dates, months, fiscal periods, and special days on the calendar. The calendar date dimension typically has many columns that describe characteristics such as date, day number, week of the month, week of the year, etc. First, I have an Excel file for the date dimension, as shown below: I want to use PySpark to make it in Incorta, and I was able to create the same data using a PySpark program. Below is the code I used. Here, it should be noted that the date I used is 1980-2060. If you need to change the year, please pay attention to replace all the places in the code that need to give the year to the year you want. Explore Data in Incorta. Here is a screenshot of the dashboard.