Forum Discussion
Calculate FIXED months between two dates
- 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!
Hi @@pconno,
As Greg_Deckler suggested, you could calculate the a count of months between date slicer dates use DATEDIFF of the MAX and MIN of your slicer like below.
If you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share some data sample and your desired output so that we could help further on it.
Best Regards,
Cherry
- pconnon7 years agoFrequent Visitor
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!