{"action":"created","issue":{"url":"https://api.github.com/repos/FeatureLabs/featuretools/issues/809","repository_url":"https://api.github.com/repos/FeatureLabs/featuretools","labels_url":"https://api.github.com/repos/FeatureLabs/featuretools/issues/809/labels{/name}","comments_url":"https://api.github.com/repos/FeatureLabs/featuretools/issues/809/comments","events_url":"https://api.github.com/repos/FeatureLabs/featuretools/issues/809/events","html_url":"https://github.com/FeatureLabs/featuretools/issues/809","id":521537107,"node_id":"MDU6SXNzdWU1MjE1MzcxMDc=","number":809,"title":"How is `DIFF` calculated?","user":{"login":"rightx2","id":10606994,"node_id":"MDQ6VXNlcjEwNjA2OTk0","avatar_url":"https://avatars0.githubusercontent.com/u/10606994?v=4","gravatar_id":"","url":"https://api.github.com/users/rightx2","html_url":"https://github.com/rightx2","followers_url":"https://api.github.com/users/rightx2/followers","following_url":"https://api.github.com/users/rightx2/following{/other_user}","gists_url":"https://api.github.com/users/rightx2/gists{/gist_id}","starred_url":"https://api.github.com/users/rightx2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rightx2/subscriptions","organizations_url":"https://api.github.com/users/rightx2/orgs","repos_url":"https://api.github.com/users/rightx2/repos","events_url":"https://api.github.com/users/rightx2/events{/privacy}","received_events_url":"https://api.github.com/users/rightx2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2019-11-12T13:01:11Z","updated_at":"2019-11-21T08:44:11Z","closed_at":null,"author_association":"NONE","body":"I read [docs](https://docs.featuretools.com/en/stable/generated/featuretools.primitives.Diff.html) but can't understand how does `DIFF` calculate its value.\r\n\r\nThis part of my example:\r\n\r\n![Screen Shot 2019-11-12 at 22 00 07](https://user-images.githubusercontent.com/10606994/68673753-cdd96b00-0597-11ea-8d32-6eec8b5cfb5e.png)\r\n\r\n\r\nI generated this dataframe using `dfs(..., time_window=None)`\r\n\r\n(`time` in index is meaning `cutoff_time`)\r\n\r\nWhat I can't understand is, `DIFF(MAX(sales.amount))` will be calculated by applying `DIFF` on `MAX(sales.amount)` but  since `MAX(sales.amount)` is an aggregated value, which would be only one single value(=max value before cutoff time), how does `DIFF` calculate its value? I think that `DIFF` requires at least 2 values to calculate?...\r\n\r\nIf I missed something, please let me know how is first value of `DIFF(MAX(sales.amount))`, 25714.287, calculated..\r\n\r\nThanks\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/FeatureLabs/featuretools/issues/comments/556980005","html_url":"https://github.com/FeatureLabs/featuretools/issues/809#issuecomment-556980005","issue_url":"https://api.github.com/repos/FeatureLabs/featuretools/issues/809","id":556980005,"node_id":"MDEyOklzc3VlQ29tbWVudDU1Njk4MDAwNQ==","user":{"login":"soliverc","id":47222261,"node_id":"MDQ6VXNlcjQ3MjIyMjYx","avatar_url":"https://avatars2.githubusercontent.com/u/47222261?v=4","gravatar_id":"","url":"https://api.github.com/users/soliverc","html_url":"https://github.com/soliverc","followers_url":"https://api.github.com/users/soliverc/followers","following_url":"https://api.github.com/users/soliverc/following{/other_user}","gists_url":"https://api.github.com/users/soliverc/gists{/gist_id}","starred_url":"https://api.github.com/users/soliverc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soliverc/subscriptions","organizations_url":"https://api.github.com/users/soliverc/orgs","repos_url":"https://api.github.com/users/soliverc/repos","events_url":"https://api.github.com/users/soliverc/events{/privacy}","received_events_url":"https://api.github.com/users/soliverc/received_events","type":"User","site_admin":false},"created_at":"2019-11-21T08:44:11Z","updated_at":"2019-11-21T08:44:11Z","author_association":"NONE","body":"Does this also happen with transaction data? Will diff compare two unrelated customers purchases against eachother?"}}
{"actor":{"display_login":"soliverc"}}