Join our Community in its new Home - The Datorama Trailblazer Community Group!
It's been an amazing 3 years coming together in this forum to collaborate, innovate, support, and inspire each other about our shared usage of Datorama. While this is not quite a goodbye, we are excited to announce that we are getting a fresh start in our new home within the Salesforce Trailblazer Community. We have a ton of fun new content planned and you may even see the revival of some of our most popular posts from the past few years.
We’ll be keeping this group around for a bit for you to peruse, but as of November 15, we will no longer be allowing new posts or comments. Be sure to join our new group at https://www.salesforce.com/success-datorama to keep the conversation going.
We can’t wait to see you there!
It's been an amazing 3 years coming together in this forum to collaborate, innovate, support, and inspire each other about our shared usage of Datorama. While this is not quite a goodbye, we are excited to announce that we are getting a fresh start in our new home within the Salesforce Trailblazer Community. We have a ton of fun new content planned and you may even see the revival of some of our most popular posts from the past few years.
We’ll be keeping this group around for a bit for you to peruse, but as of November 15, we will no longer be allowing new posts or comments. Be sure to join our new group at https://www.salesforce.com/success-datorama to keep the conversation going.
We can’t wait to see you there!
Calculating Time Difference between 2 dates + Classifying time difference


Hi all,
I was wondering if anyone could help with solving a set of calculated measurement/dimension problems
Our data has dimension that changes classifications based on time - so i want to do 2 calculations:
Calculating the number of weeks between 2 dates - 'Today' (dynamic) and the date that's in the database
For instance 'Today (Dynamic based on the actual date using TODAY())' = 28/05/2021, Date in DB = 23/09/2021 ---> 118 days between the 2 dates
The second part is to create a calculated dimension that classifies what that number would fall into in terms of a range:
In excel it'd look like this: IF(AND([new calculated days]>=0,G2<=84),"12 Weeks")
Im asking for help here as i keep getting NaN when trying to calculate the days and then the calculated dimension wont work.
Any suggestions on refining getting this to work?
(FYI im trying to dynamically classify records of pregnancy period, 1st Trimester, 2nd Trimester etc - which is always moving based on the date you are looking at the data so cant use a fixed classification table)
I was wondering if anyone could help with solving a set of calculated measurement/dimension problems
Our data has dimension that changes classifications based on time - so i want to do 2 calculations:
Calculating the number of weeks between 2 dates - 'Today' (dynamic) and the date that's in the database
For instance 'Today (Dynamic based on the actual date using TODAY())' = 28/05/2021, Date in DB = 23/09/2021 ---> 118 days between the 2 dates
The second part is to create a calculated dimension that classifies what that number would fall into in terms of a range:
In excel it'd look like this: IF(AND([new calculated days]>=0,G2<=84),"12 Weeks")
Im asking for help here as i keep getting NaN when trying to calculate the days and then the calculated dimension wont work.
Any suggestions on refining getting this to work?
(FYI im trying to dynamically classify records of pregnancy period, 1st Trimester, 2nd Trimester etc - which is always moving based on the date you are looking at the data so cant use a fixed classification table)