Saturday, March 30, 2024

Saturday, March 23, 2024

Analytical Calendar - Simplification

Post Index

Analytical Calendar The Story

2024-03-23

Analytical Calendar

Simplification

Enhancement Based on Use Feedback


Analytical Calendar is very simple to use with the sequence to select:

1. Date Perspective to select the date granularity

2. Unique Date to select the date for analysis

3. Analysis Perspective to select the date range

4. Comparison period to select the date range for comparison.  

Logically speaking, it is quite systematical but a lot of end users are not familiar or understand very well why date perspective should be chosen at the beginning.  And it generates questions on the usage.  Being said, it is simple to sequentially select these fields one by one, it does not cognitively accept by end user of this sequence.  It, thus, becomes difficult to user and understand.

It has been a while for the issue until a feedback comes in.



Feedback and Analysis

Recently, it was heard a feedback to change the sequence to below:

1. Analysis Perspective to select the date range

2. Date Perspective to select the date granularity

3. Unique Date to select the date for analysis

4. Comparison period to select the date range for comparison.  

Ah.....it brainstorms that end user starts analysis not from date granularity but analysis perspective, e.g Actual, YTD, Rolling 6 months, etc.  With this idea, the below are popped up to revisit:

1. Is it possible to remove date perspective but can maintain the relationship against Unique Date?

2. Is it possible to apply this sequence flow?

3. Can the analytical calendar be simpler?


As a result, a solution is out to try to address this.  Let's see what it does and how can solve this.



Analysis Perspective merges with Date Perspective

Let's first review what is included in the Date Perspective and Analysis Perspective.  In short, one is for date granularity and one is for the date period range.



It is always being said that it was inconvenient because of the date perspective.  It can be understood that human does not deal with this explicitly in daily life.  More often, it is used unconsciously without user cognition.  So, in particular to this, an attempt is made to a closer look to into the date perspective and analysis perspective.

It is found that to some extent, Analysis Perspective also includes the ingredient of date granularity, e.g. Rolling 2 Years, Year to Quarter, etc.  All these ranges have date granularity but just "Actual" is not.  So, the below is tried to merge the date perspective into the analysis perspective.


The major changes, in fact, to the Analysis Perspective is on the "Actual".  Now, it becomes "Actual Year", "Actual Quarter", "Actual Month", "Actual Week" and "Actual Date".  It breaks exactly which Actual Date granularity.


As a result, there are only now three fields required now and date perspective can be removed.

1. Analysis Perspective

2. Unique Date

3. Comparison Perspective

Does it look better and easier now?  Yes, it was also heard Unique Date is not easy to interpret but do you have any suggestion for a better term?  I think from meaning-wise, unqiue date is the most suitable.


Model Simplification

Along with the attempt to simplify the selection processes and fields required, there is also attempt to simplify the data model to let everyone easier to manipulate the analytical calendar.

The below is the simplified data model.


The changes include:

1. Remove Custom Date comparison.  It creates complicated data model and the use case is less occurred.

2. Combined Analysis Calendar and Comparison Calendar into Analytical Calendar.

As a result, only three tables are required.

1. ANALYTICAL_CALENDAR to have all analysis and comparison calendar details.

2. DATE_RANGE_LINKED_TABLE to have all associated dates against the selection in analytical calendar.

3. DIM_CALENDAR to provide dimension values for chart creation.


Is it simple to use and understand now?  What do you think?  Please leave me comments to improve.



Thank you for reading.  I hope it help.  Leave me message if you have any discussion or want to share your views.




Saturday, March 16, 2024

Analytical Calendar - PowerPoint Deck

   Post Index

Analytical Calendar The Story

2024-03-16

Analytical Calendar

Presentation Deck

A Deck helps to explain Analytical Calendar

*A new version will be available on 2024-03-30 


This post is to provide you a deck to help explain about the analytical calendar.  The screen captures are shown below and the corresponding PowerPoint as well as the applications, you can find in below links.


PowerPoint

https://github.com/kongson-cheung/analytical-calendar/blob/main/PowerPoint/AnalyticalCalendar_2024-03-16.pptx


QlikView Example

https://github.com/kongson-cheung/analytical-calendar/blob/main/QlikView%20Analytical%20Calendar%20Examples/AnalyticalCalendar5.4.qvf


PowerBI Example

https://github.com/kongson-cheung/analytical-calendar/blob/main/PowerBI%20Analytical%20Calendar%20Examples/AnalyticalCalendar5.4.pbix


Qlik Sense Example

https://github.com/kongson-cheung/analytical-calendar/blob/main/Qlik%20Sense%20Analytical%20Calendar%20Examples/Analytical%20Calendar%205.0_Complete_Week_With_Custom.qvf

* Qlik Sense Example, I have got some issue in my Qlik Sense Desktop.  You might refer to old version at the moment.


The presentation slides:



























Thank you for reading.  I hope it help.  Leave me message if you have any discussion or want to share your views.

Saturday, February 3, 2024

Analytical Calendar - Concept in Brief

  Post Index

Technical Discussion | Analytical Calendar The Story | The Index Page

2024-02-03

Analytical Calendar

Concept In Brief

Core Understanding of Analytical Calendar


Analytical Calendar looks like simple but also complicated.  To make sure it is easier to digest and understand, I would like to provide the concept in brief.

Let's first have a review of Analytical Calendar. Analytical Calendar consists of two calendars including Analysis Calendar and the Comparison Calendar.  Analysis Calendar is to define the analysis period while the comparison calendar is to define the comparison period.


Analytical Calendar consists of 4 core fields including:

Date Perspective

It is to define what date granularity is required for the analysis and comparison.  Without this selection, it is still possible but the Unique Date selection is difficult to filter out the required Unique Date in the list.

Unique Date

Based on the date perspective, it allows the corresponding date to be shown for selection.  For instance, If Year is selected in Date Perspective, Unique Date will show 2024, 2023, 2022, etc; if Month is selected, it shows 2024-Feb, 2024-Jan, 2023-Dec, etc.

Analysis Perspective

With the Unique Date as reference, Analysis Perspective define the period requirements such as:

- Actual

- YTD, YTM, YTW, etc

- Rolling N Year/Quarter/Month/Week/Day

Comparison Perspective

With the defined Analysis requirements, it further selects the comparison period with respect to the analysis requirements.

- N Year/Quarter/Month/Week/Day Before

- Custom Year/Quarter/Month/Week/Day

- N/A



How the Calendars Work

In Analytical Calendar, the usage is like below flow.

Analysis Period --> Comparison Period --> Calendar Control --> Fact Table Association


Analysis Period

The Analysis Period is purely defined by Date Perspective, Unique Date and Analysis Perspective.

Date Perspective and Unique Date are apparently a new method to define a date in particular granularity.  This method eliminates conflicts in human interpretation and manipulation about the selected date by date hierarchy, i.e. Year-->Month/Week-->Date.

Once the Date with Granularity is defined, next is to define the date range by Date Perspective.  The selected Unique Date is actually the date end of the date range.  If date range is having same start and end date, it is called Actual.  Other will be represented by YTD, YTM, Rolling N Year/Month/Quarter/Week/Day.

All these then construct the Analysis Calendar.


Comparison Period

Comparison Period cannot exist without the Analysis Period.  It is, in fact, a period with reference to the date range of the analysis period.  The Comparison Perspective is generalized with a standard representation in two ways.  One is to define a date range before and the other is free date selection.

There is one very special scenario for Comparison Perspective is no comparison period.  For completeness purpose, it is required for a value to be selected in the comparison period.

As a result, three categories are available.  And the Date Perspective, Unique Date and Analysis Perspective and Comparison Perspective construct the Comparison Calendar.


Calendar Control

Both analysis period and comparison period are, in fact, trying to reflect the selection in Analysis Calendar and Comparison Calendar.  The analysis period defined is tagged as ANALYSIS while the comparison period defined is tagged as COMPARISON.  If the CONTROL is not selected with a value, it means both analysis and comparison.

This CONTROL is very important in order to control which calendar to take effect.


Fact Table Associated

The Fact Table associated with both analysis and comparison periods in the form of the actual date association.   Based on the Control (ANALYSIS or COMPARISON), it allows to reflect the analysis period and comparison period.


Two examples are illustrated below.



In the first example, Date Perspective, Unique Date and Analysis Perspective first define 2023-05 for Analysis period.  And then the Comparison Perspective furthers define the Comparison period to be 2023-04.  Both Analysis Period and Comparison Period are combined into the into the Calendar Control where indicating 2023-05-01 to 2023-05-31 is ANALYSIS Period and 2023-04-01 to 2023-04-30 is COMPARISON Period.  Then the actual date range is reflected into the fact table with the range 2023-04-01 to 2023-05-31.

The second example is similar to the first example but this time, no comparison period is defined.  Thus, the Calendar Control only has ANALYSIS Period and Fact Table is only reflecting the date range from 2023-05-01 to 2023-05-31.


Summary

Analysis Calendar provide methods to select values to define the ANALYSIS period while Comparison Calendar provide methods to select values to define the COMPARISON period.  Fortunately, both calendars share the same fields including Date Perspective, Unique Date and Analysis Perspective.  This is one of the main design of Analytical Calendar and it is one reason why it can simplify the selections.  The other main concept is the Calendar Control.  It is important that there is a way to distinguish the ANALYSIS and COMPARISON periods.  Incorporating these concepts altogether, it is the Analytical Calendar.

I hope this brief description can help you understand further about the Analytical Calendar.  Next, I would share how to apply Analytical Calendar into other tools like PowerBI and Tableau.


Thank you for reading.  I hope it help you.  Just leave a message if you have any discussion/share want to make.