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 all, I want to create a measure that calculates the age of customer in months from the earliest contract start date to the current date. For example, for customer 1 the earliest contract start date is 7/20/18 so I want to have their age be the difference in months from today's date and 7/20/18.
How would I write this measure calculation?
Customer | Product Purchased | Contract Start Date |
1 | cloud | 7/20/18 |
1 | data center | 9/30/18 |
2 | cloud | 8/20/19 |
2 | data center | 8/30/19 |
Solved! Go to Solution.
@Anonymous , Create a new column like
datediff(minx(filter(table,[Customer]= earlier[Customer]),[Contract Start Date] ), today(), month)
or
datediff(minx(filter(table,[Customer]= earlier[Customer]),[Contract Start Date] ), today(), year)
Hi @Anonymous ,
Try the below measure.
Regards
Simran Tuli
@Anonymous , Create a new column like
datediff(minx(filter(table,[Customer]= earlier[Customer]),[Contract Start Date] ), today(), month)
or
datediff(minx(filter(table,[Customer]= earlier[Customer]),[Contract Start Date] ), today(), year)
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 |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |