{"action":"created","issue":{"url":"https://api.github.com/repos/otykier/TabularEditor/issues/112","repository_url":"https://api.github.com/repos/otykier/TabularEditor","labels_url":"https://api.github.com/repos/otykier/TabularEditor/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/otykier/TabularEditor/issues/112/comments","events_url":"https://api.github.com/repos/otykier/TabularEditor/issues/112/events","html_url":"https://github.com/otykier/TabularEditor/issues/112","id":272036944,"number":112,"title":"UsedInMeasures and UsedInCalculatedColumns","user":{"login":"Gezahegne","id":29150742,"avatar_url":"https://avatars3.githubusercontent.com/u/29150742?v=4","gravatar_id":"","url":"https://api.github.com/users/Gezahegne","html_url":"https://github.com/Gezahegne","followers_url":"https://api.github.com/users/Gezahegne/followers","following_url":"https://api.github.com/users/Gezahegne/following{/other_user}","gists_url":"https://api.github.com/users/Gezahegne/gists{/gist_id}","starred_url":"https://api.github.com/users/Gezahegne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gezahegne/subscriptions","organizations_url":"https://api.github.com/users/Gezahegne/orgs","repos_url":"https://api.github.com/users/Gezahegne/repos","events_url":"https://api.github.com/users/Gezahegne/events{/privacy}","received_events_url":"https://api.github.com/users/Gezahegne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/otykier/TabularEditor/milestones/2","html_url":"https://github.com/otykier/TabularEditor/milestone/2","labels_url":"https://api.github.com/repos/otykier/TabularEditor/milestones/2/labels","id":2871300,"number":2,"title":"2.7","description":null,"creator":{"login":"otykier","id":8976200,"avatar_url":"https://avatars3.githubusercontent.com/u/8976200?v=4","gravatar_id":"","url":"https://api.github.com/users/otykier","html_url":"https://github.com/otykier","followers_url":"https://api.github.com/users/otykier/followers","following_url":"https://api.github.com/users/otykier/following{/other_user}","gists_url":"https://api.github.com/users/otykier/gists{/gist_id}","starred_url":"https://api.github.com/users/otykier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otykier/subscriptions","organizations_url":"https://api.github.com/users/otykier/orgs","repos_url":"https://api.github.com/users/otykier/repos","events_url":"https://api.github.com/users/otykier/events{/privacy}","received_events_url":"https://api.github.com/users/otykier/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":14,"state":"open","created_at":"2017-10-28T07:27:25Z","updated_at":"2018-02-22T15:11:34Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-11-08T00:46:12Z","updated_at":"2018-03-02T00:24:11Z","closed_at":"2018-02-22T15:11:34Z","author_association":"NONE","body":"I am wondering if there were UsedInMeasures and UsedInCalculatedColumns like UsedInRelationships and UsedInHierarchies. I want to do the following in the Best Practice Analyzer:\r\n1. Get the list of hidden measures that are not used within other measures.\r\n2. Get the list of hidden columns that are not used with other measures or Calculated Columns.\r\n\r\nThanks,\r\nGez"},"comment":{"url":"https://api.github.com/repos/otykier/TabularEditor/issues/comments/369778260","html_url":"https://github.com/otykier/TabularEditor/issues/112#issuecomment-369778260","issue_url":"https://api.github.com/repos/otykier/TabularEditor/issues/112","id":369778260,"user":{"login":"otykier","id":8976200,"avatar_url":"https://avatars3.githubusercontent.com/u/8976200?v=4","gravatar_id":"","url":"https://api.github.com/users/otykier","html_url":"https://github.com/otykier","followers_url":"https://api.github.com/users/otykier/followers","following_url":"https://api.github.com/users/otykier/following{/other_user}","gists_url":"https://api.github.com/users/otykier/gists{/gist_id}","starred_url":"https://api.github.com/users/otykier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otykier/subscriptions","organizations_url":"https://api.github.com/users/otykier/orgs","repos_url":"https://api.github.com/users/otykier/repos","events_url":"https://api.github.com/users/otykier/events{/privacy}","received_events_url":"https://api.github.com/users/otykier/received_events","type":"User","site_admin":false},"created_at":"2018-03-02T00:24:11Z","updated_at":"2018-03-02T00:24:11Z","author_association":"OWNER","body":"Just a quick update on this for future reference. 2.7 now exposes the `DependsOn` property on all objects that have DAX expressions (measures, calculated columns, calculated tables) and the `ReferencedBy` property on all objects that can be referenced in other DAX expressions (well, (except for KPIs)[https://github.com/otykier/TabularEditor/issues/134]).\r\n\r\nThe `DependsOn` property is an object of type [DependsOnList](https://github.com/otykier/TabularEditor/blob/9dcbba152c727b815ebb84a2d9041a4536f3e3e4/TOMWrapper/Utils/DependencyList.cs#L14), while the `ReferencedBy` property is an object of type [ReferencedByList](https://github.com/otykier/TabularEditor/blob/9dcbba152c727b815ebb84a2d9041a4536f3e3e4/TOMWrapper/Utils/DependencyList.cs#L151). Both these objects support the following properties, making it easy to detect if an object references / is referenced by other objects:\r\n\r\n- `Count`: The number of direct dependencies / directly dependant objects\r\n- `Measures`: A list of measures that directly depend on / are referenced by the current object\r\n- `Columns`: A list of (calculated) columns that directly depend on / are referenced by the current object\r\n- `Tables`: A list of (calculated) tables that directly depend on / are referenced by the current object.\r\n\r\nIn short, this allows to create, for example, a BPA rule that detects hidden columns which are not referenced by anything, by using the following Dynamic LINQ expression in the BPA rule:\r\n\r\n```\r\nIsHidden and ReferencedBy.Count = 0\r\n```"}}
{"actor":{"display_login":"otykier"}}