DDIFF calculations in Analytics?

Can anyone help me with the proper syntax for using the DDIFF function to calculate how many days it has been between any specific date and today?

Parents
  • Look at the Functions tab to see the syntax for each function.

    For "today", use the NOW function.

    If you were computing the date difference between today and the performance date, you would use this:

    DDIFF ([Days in Date], NOW([Days in Date]))

    Now for the weird part, it seems to matter what kind of data you have in a pivot table. If I have text data, I need to divide the formula by 4 in order for it to compute correctly.

    If I have Date data, the formula computes correctly without the divide by 4 part.

    If you add numeric data, you get an error.

    However, if you add an additional Value, it will compute correctly without the divide by 4 or an error.

    Well that was fun.

Reply
  • Look at the Functions tab to see the syntax for each function.

    For "today", use the NOW function.

    If you were computing the date difference between today and the performance date, you would use this:

    DDIFF ([Days in Date], NOW([Days in Date]))

    Now for the weird part, it seems to matter what kind of data you have in a pivot table. If I have text data, I need to divide the formula by 4 in order for it to compute correctly.

    If I have Date data, the formula computes correctly without the divide by 4 part.

    If you add numeric data, you get an error.

    However, if you add an additional Value, it will compute correctly without the divide by 4 or an error.

    Well that was fun.

Children