Forum Discussion

Rehab_hassan's avatar
Rehab_hassan
Frequent Visitor
7 years ago
Solved

create a measure to calculate time difference

hello all,   I am getting my data from the analysis services database where adding coloums option is greyed out (I amnot sure if this is my company limitation) and the only option I have is adding ...
  • MFelix's avatar
    7 years ago

    Hi Rehab_hassan ,

     

    On the analisys service is not possible to add columns, this is not a limitation from your company but is because of the model type. Analisys services are "closed" databases and you cannot change the model as you want since doing it would break the analisys services results.

     

    Regarding the question you are placing I'm assuming that the two dates you refer are columns on your model you could try to use something like this:

     

    delta = DATEDIFF(MAX('opportunties'[Created On]),MAX('opportunties'[Updated On]),DAY)

    Be aware that being a analisys service there another limitations like some DAX formulas not being available, some calculations are not quite made in the same way and you need to make work arounds.

     

    Regards,

    MFelix