Visokio website     Downloads     Video tutorials     KnowledgeBase  
Formulae: Time period comparisons - WoW or MoM? - Visokio Forums
Formulae: Time period comparisons - WoW or MoM?
  • kgurus September 19, 2012 12:49PM
    Hi all,

    I have two requirements and both are pretty much linked or part of the same solution:

    1. I need to show a table view of metrics and their respective values corresponding to current and previous week. Also, I want to calculate the % different (WoW, MoM etc..) based on the user selections. How do I calculate previous week and show it in the data field?

    2. If the user selects only quarter and does not select month or week then the current week and month should be taken as maximum of week and month in that particular quarter. Also, based on this, previous week should be calculated in the background and result should appear.

    I have attached a file to explain the desired result. Any help would be greatly appreciated!

    Thank you!
  • 6 Comments
  •     paola September 19, 2012 1:21PM
    Please see a similar discussion and the IOK file attached.
    http://forums.visokio.com/discussion/comment/6324/#Comment_6324

    Daily data was aggregated to create weeks in the demo file, similarly in your case you can aggregate on month number.
  • kgurus September 19, 2012 2:29PM
    Hi Paola,

    Thanks for your guidance.

    However, I'm not able to correctly incorporate the logic that would bring me desired results based on your approach. I'm also a bit confused with the usage and purpose of subset functions.

    Please find the file I created using the data shared earlier (Also attached as you mentioned it didn't open in your browser earlier).

    Could you please let me know if there are any good tutorials available online to help me and everyone who is viewing this thread to grasp the fundamentals? Thanks again.
  •     paola September 21, 2012 2:19PM
    Formulas used in that file rely on Subset functions - Omniscope basics...
    Please have a look at this page and you will find explanation, as well as some useful demos and examples
    http://www.visokio.com/kb/subset-functions
  • kgurus September 24, 2012 2:14AM
    Thanks Paola. Will go through the demos.
  • kgurus September 24, 2012 9:06AM
    Hi Paola,

    Links have been very helpful. I have achieved almost everything needed for my visualization except one thing.

    Whenever I select a particular quarter, my current and previous month values appear perfectly and I'm able to show % MoM in the report. But when I select one particular month then I do not get any values for my previous month.

    I understand this is because my filtered data has only the selected month's data hence it is unable to calculate value for previous month.

    I cannot use de-query as I want the user to select month.

    This is the formula I'm using:

    SUBSET_SUM([Impressions], SUBSET([Month_H], SUBSET_MAX([Month_H])-1))

    Question: How do I get the dataset for all the months in a particular quarter but also allow the user to select which month in that particular quarter?

    Thanks.
  •     paola September 24, 2012 12:38PM
    You need to use [Quarter] or [Month] field with your Subset function e.g.

    IF([Quarter number]>xx,
    SUBSET_SUM([Impressions], SUBSET([Quarter number]))
    -
    SUBSET_SUM([Impressions], SUBSET([Quarter number],[Quarter number]-1))
    , null)

    This formula adds up the Impressions for all the records with the same Quarter as the current record, and then takes away sum of Impressions for the records from previous Quarter.
    If you have data stretching over several years, you will need to use combination of [Year][Quarter number] fields. See the link above for Subset2, Subset3 functions allowing you to use combination of several criteria.

    You might miss the MoM/WoW data for previous period if you've clicked on the first period in your time series? (that is why IF function is used above)

    You should also try to use Aggregation in Table View, using different periods to aggregate data (week, month, quarter).

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership