Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a token with API scope in License Statistics.
  2. Add a Web data source to Power BI.
  3. Prepare the License Statistics API data for use with Power BI  BI.
  4. Use the prepared License Statistics data to create a Power BI report.

These steps are detailed below.

...

  1. Create a new report.
  2. From the "Get data" menu, select Web as the data source.



  3. Complete the form that displays.



    1. Toggle the form to Advanced.
    2. Add to add the API endpoints (URL parts) and click Add part to see the URL preview. The example above uses the endpoint "/api/v2/feature/ID/usage-history/json," where the ID variable (set to 60 in our example) can be retrieved by using the "/api/v2/feature/list" endpoint or from the Feature ID column in any License Statistics grid, as shown in the illustration below. (The Feature ID column is hidden by default, so you may need to toggle its visibility on.)



    3. Set the query parameters; for . For our example, you might we set a start date of December 6, 2022, and an end date of December 11, 2022, using the following parameters (see API endpoints for a complete list of API endpoint parameters):
      1. sd=2022-12-06
      2. ed=2022-12-11
      3. granularity=DAY



    4. Add At the bottom of the form, add the appropriate HTTP request headers; for our example:

      1. Accept: */*
      2. X-Auth-token: {API token value}
        Image Removed
    5. Click OK to accept the completed form. 

  4. When prompted, use the Anonymous access option. Authorization has been handled by the token we added to the header in the previous step.
    Image Removed
    Image Added

  5. Click Connect to access the defined Web source and get the requested data, which appears as shown below.
    Image Removed
    Image Added

Prepare the data

...

  1. Click List to navigate to the data key details.  
    Image Removed
    Image Added

  2. Convert the list of records to a table using the "To Table" option.
    Image Removed
    Image Added

  3. The results appear as shown below.
    Image Removed
    Image Added

  4. The resulting Table of records can be expanded to include multiple columns. Select the fields you want to include in your report from the response that are needed for your desired report. (Note: You can also set a list of returned columns using the fieldsVisibility request parameter.)

    Image Added

    For our example, we 'll choose selected the following fields:
    1. lud (date)

    2. lumin (min used)

    3. lumax (max used)

    4. ft (total)

      Image Removed

  5. Click OK after you've selected the desired fields. The table will be expanded to a multi-column view.



    Note: See API endpoints for a full list of parameters along with descriptions.



  6. For proper processing, define the type of data for each column. In our example, the lud property is a Date type, while the rest of the properties are Whole Numbers.
    Image Removed
    Image Added

  7. Rename the columns so they will be understandable in the reports.
    Image Removed
    Image Added

Create a report in Power BI using the License Statistics data

...

For our example, we created a line chart with a date on the X Axis and, on the Y Axis, the values from the three data series: Max Used, Min Used, and Total.

Image RemovedImage Added