Hi guys, how (or where) can I find affected report...
# gooddata-platform
l
Hi guys, how (or where) can I find affected reports for any metric? I remember that it was here, but the button is grizzled. Thanks
i
Hi Luděk, Looks like this particular metric is not used by any actual reports. But it might be still used by some other objects(Dashboards, report definitions, filter context,..)
For more detailed results, you can use this endpoint from our Gray Pages:
Copy code
https://<your_hostname>/gdc/md/{workspace_id}/usedby2
You can also check related APIs .
l
Hi Ivana, you probably mean insights, this metric is used in many insights. with this url
<https://omnetic-dev.on.gooddata.com/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/4594>
I get this GP result
Copy code
{
  "metric": {
    "content": {
      "expression": "SELECT COUNT ([/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/4522])\nWHERE [/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/2435] in ([/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/2435/elements?id=52257], [/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/2435/elements?id=35769])\nand [/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/564] in ([/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/564/elements?id=45043])",
      "folders": [
        "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/7609"
      ],
      "format": "#0",
      "tree": {
        "content": [
          {
            "content": [
              {
                "content": [
                  {
                    "position": {
                      "column": 28,
                      "line": 1
                    },
                    "type": "attribute object",
                    "value": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/4522"
                  }
                ],
                "position": {
                  "column": 21,
                  "line": 1
                },
                "type": "function",
                "value": "COUNT"
              }
            ],
            "position": {
              "column": 21,
              "line": 1
            },
            "type": "expression"
          },
          {
            "content": [
              {
                "content": [
                  {
                    "content": [
                      {
                        "position": {
                          "column": 7,
                          "line": 2
                        },
                        "type": "attribute object",
                        "value": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/2435"
                      },
                      {
                        "content": [
                          {
                            "position": {
                              "column": 63,
                              "line": 2
                            },
                            "type": "attributeElement object",
                            "value": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/2435/elements?id=52257"
                          },
                          {
                            "position": {
                              "column": 134,
                              "line": 2
                            },
                            "type": "attributeElement object",
                            "value": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/2435/elements?id=35769"
                          }
                        ],
                        "position": {
                          "column": 63,
                          "line": 2
                        },
                        "type": "list"
                      }
                    ],
                    "position": {
                      "column": 59,
                      "line": 2
                    },
                    "type": "in"
                  },
                  {
                    "content": [
                      {
                        "position": {
                          "column": 5,
                          "line": 3
                        },
                        "type": "attribute object",
                        "value": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/564"
                      },
                      {
                        "content": [
                          {
                            "position": {
                              "column": 60,
                              "line": 3
                            },
                            "type": "attributeElement object",
                            "value": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/564/elements?id=45043"
                          }
                        ],
                        "position": {
                          "column": 60,
                          "line": 3
                        },
                        "type": "list"
                      }
                    ],
                    "position": {
                      "column": 56,
                      "line": 3
                    },
                    "type": "in"
                  }
                ],
                "position": {
                  "column": 1,
                  "line": 3
                },
                "type": "and"
              }
            ],
            "position": {
              "column": 1,
              "line": 2
            },
            "type": "where"
          }
        ],
        "position": {
          "column": 14,
          "line": 1
        },
        "type": "metric"
      }
    },
    "links": {
      "explain2": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/4594/explain2"
    },
    "meta": {
      "author": "/gdc/account/profile/267c38424d44b46c9408830dc4deb307",
      "category": "metric",
      "contributor": "/gdc/account/profile/92f19d6d8e992dfd3c778860c63fb03b",
      "created": "2022-09-29 10:21:20",
      "deprecated": "0",
      "identifier": "abFYmbcBwYPl",
      "isProduction": 1,
      "summary": "id: aa0swl4nGm2f",
      "tags": "",
      "title": "Vehicle Id count STOCK (FOR-SALE, SELLING)",
      "updated": "2022-11-15 10:29:59",
      "uri": "/gdc/md/l9slwz3cdaz6ewt7syxhu5n1mymtgup4/obj/4594"
    }
  }
}
Are you able to help me with it please? Because I see grizzled "Revief Affected Reports" button grizzled for all metrics in project. Thanks
m
Hi Luděk, unfortunately this button is only showing if the metric is used in any of the legacy reports and it does not show you the usage in the insights. There is currently not any official UI where it would display the usage yet 😞 so you would need to use the API as Ivana suggested. However, if you are using the Chrome browser, you might use the GoodData Extension for Chrome. Apart from other things, it allows you to see which metrics are used in which insights. It uses this API on the background and provides a simple UI for users. See this chapter in its documentation on how to use the USED and USING features.
i
I am sorry Luděk, I incorrectly assumed that you are working with the Reports from the PixelPerfect UI.
l
Hi @Ivana Gasparekova, thanks for all your tips, finally I found it in Chrome Extension (like @Michal Hauzírek wrote then). Have a nice day 👏
👍 2