Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 the average of sales between 2 dates for each customer, but globally and not only considering the months I got a sale to a customer. In example, in a 24 months period what's the sales average fot customer X who a only sale him on march and june 2018?
any ideas?
Solved! Go to Solution.
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
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
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
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!
Seems like you could use DATEDIFF of the MAX and MIN of your slicer.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |