Forum Discussion

EliasAR's avatar
EliasAR
Regular Visitor
2 years ago
Solved

Using End of Month as outer context to show active subscriptions per month

Hi everyone   I have a database with different sales opportunities, each of them has a "Service Start Date", a "Service End Date" and a Value.   Example:  Client 1, SSD= 01/01/2023, SED= 31/12/2...
  • DataNinja777's avatar
    2 years ago

    Hi EliasAR 

    In order for your duration calculation (yellow highlighted part) to perform in the manner you intended, you need to have the calendar table and your fact tables as disconnected tables.  This is because you have start date and end date in your fact table (two date fields) and because of multiple date fields, you should not create relationship with the calendar table for it to calculate the duration properly.  

     

    The technique used is similar to headcount formula, albeit amounts are involved in your service revenue projection.  

    The link below shows an example of the use of disconnected tables to achive the similar result which you require relating to the duration calculation.  

    https://p3adaptive.com/finding-the-magic-part-2-on-the-way-to-data-happiness/

    Best regards,