Forum Discussion

pconnon's avatar
pconnon
Frequent Visitor
7 years ago
Solved

Calculate FIXED months between two dates

I'm trying to calculate a count of months between date slicer dates to used it as a denomitar in order to calculate an average based on all periods for all customers.    The idea is to calculate th...
  • pconnon's avatar
    pconnon
    7 years ago

    I tried this solution, but the problem was that when I use the result on a table with all my customers this value was reevaluated for each customer with only the dates on which the sales where made and I needed a fixed value.

     

    What I did was to create a new table CALENDAR

     

    Calendar = CALENDAR( DATE(2015;01;01) ; DATE(2020;01;01))

     

    and use these values on the slicer instead of the sales dates. With these changes I was able to calculate a sales frequency for each customer on a fixed period.

     

    thanks!