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.
Hi guys,
I created a matrix (screenshot below is a sample):
Basically "1" & "0" here are for determining the status of the customer: If customer bought something in a month, I marked them as Active ("1"). For this purpose, I used the function:
if([MonthlyPrice] > 0 , 1, 0)
Now, I want to create a new measure: if they are "Active" over the last 3 months (current month, previous month & the month before previous month), I mark them as "Returning" customers. I would like the table to calculate this new status every month for e.g. if we are looking at Dec 2015, the status be based on Oct-15, Nov-15 & Dec-15 and so on. However, I don't know if we can reference the cutomer's "Active" status for previous months. I just wonder if we can use DAX to do something like that?
Any help/insight will be really appreciated! Thank you!
Henry
Solved! Go to Solution.
I think I found the solution for this: I created a date column based on [Month] & [Year]; then I calculate the moving sum of "Active" status over the last 3 months for each row using the DATESINPERIOD() function. The matrix was just an end result. Thank you for very useful discussion on:
https://community.powerbi.com/t5/Desktop/Moving-Average/m-p/43041#M16519
I think I found the solution for this: I created a date column based on [Month] & [Year]; then I calculate the moving sum of "Active" status over the last 3 months for each row using the DATESINPERIOD() function. The matrix was just an end result. Thank you for very useful discussion on:
https://community.powerbi.com/t5/Desktop/Moving-Average/m-p/43041#M16519
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |