web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How do I create a custom measure that measures time since a date?

(3) ShareShare
ReportReport
Posted on by 174
With the limited amount of functions and operators available in CI-D to create custom measure, I am struggling to do this. Essentially, I want to create a custom measure that displays number of years (formatted like NN.N) since a person became a customer (which can be read from a date field in a table related to the contact record). Any ideas on how to solve this without access to more advanced tools?
I have the same question (0)
  • Hamza H Profile Picture
    2,027 Super User 2026 Season 2 on at
    Use this custom measure in CI-D:
    DateDiff(customerSinceDate, Now()) / 365.0
    
    It calculates years since becoming a customer. Formatting (e.g., NN.N) can be handled in Power BI.
  • CU03091316-0 Profile Picture
    174 on at
    The suggested answer with datediff does not do the job, as this is menu driven in CI-D and the only available choices are the ones listed in this screenshot:
  • Suggested answer
    Quartzite Profile Picture
    135 on at
    Yes, creating a custom measure in Customer Insights - Data (CI-D) with limited functions can be tricky, especially when you want to do something like calculate the number of years since a customer joined.
     

    - Use the DateDiff() function (which is supported in CI-D measures)

    - Divide the number of days by 365.25 to approximate years (accounts for leap years).

    - Round or format to 1 decimal if possible (depending on formatting capabilities in UI or destination).
     
     
  • CU03091316-0 Profile Picture
    174 on at
    To those of you replying this can be solved with the datediff function: This is not available for building measures in CI-D. The only available funcitons you can choose from in the measure definition screen are:  Sum, Average, Count, Count Unique, Max, Min, First, Last, Argmax and Argmin.
     
    Non-AI generated replies with an answer that solves the problem are welcome :-)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 86 Super User 2026 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 58 Most Valuable Professional

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 42 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans