Forum Discussion

dcohare's avatar
dcohare
Helper I
1 year ago
Solved

Usage Data Won't Refresh

Hi - 

 

I am trying to get the Usage Data Metrics for one of my reports. We haven't refreshed the usage metrics since September 2024 and yesterday, we tried to refresh. Got the error that the credentials were wrong, so we updated the credentials. The refresh last night was successful; however, when I go in today, I'm still getting the data from September and the error message saying the credentials are wrong. 

 

What do I need to do to update the usage metrics?

 

Thanks!

 

Screenshot showing successful refresh last night:

 

Error message this morning:

 

  • Hi dcohare 

    Sorry the late response and inconvenience caused.

    If you prefer not to delete the dataset, you can trigger a refresh using the Power BI REST API.

     

    Please follow the below steps to refresh using the API.

    • Register an App in Azure AD. 
    • Get Workspace & Dataset ID from service.
    • Trigger Refresh using below PowerShell.

    ******************************************************** 

     $clientId = "YOUR_CLIENT_ID"

    $clientSecret = "YOUR_CLIENT_SECRET"

    $tenantId = "YOUR_TENANT_ID"

    $workspaceId = "YOUR_WORKSPACE_ID"

    $datasetId = "YOUR_DATASET_ID"

     

    # Get Access Token

    $tokenUri = "https://login.microsoftonline.com/$tenantId/oauth2/token"

    $body = @{

    grant_type = "client_credentials"

    client_id = $clientId

    client_secret = $clientSecret

    resource = "https://graph.microsoft.com"

    }

    $tokenResponse = Invoke-RestMethod -Uri $tokenUri -Method Post -Body $body

    $accessToken = $tokenResponse.access_token

     

    # Trigger Dataset Refresh

    $headers = @{ Authorization = "Bearer $accessToken"; "Content-Type" = "application/json" }

    $uri = "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/datasets/$datasetId/refreshes"

    $response = Invoke-RestMethod -Uri $uri -Headers $headers -Method Post

    Write-Output "Refresh Triggered"

    *******************************************************

    • Go to Power BI Service → dataset settings and refresh

     

    If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.

    Best Regards,
    Community Support Team _ C Srikanth

11 Replies

  • Hi dcohare The best option is to delete the current semantic model and recreate the report.


    To delete: 

    Go to the workspace and to the right of any Semantic Model ckick More Options > Settings. Then scroll and click on the Usage Metrics Report Semantic Model. Get the group and dataset ID in the URL.

     

    Then use the Power BI Rest API to delete the dataset.

    https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/delete-dataset-in-group 

     

    After successfully deleting the dataset, recreate the Usage Metrics Report.

    https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-modern-usage-metrics 

      • Wikkleyn_81's avatar
        Wikkleyn_81
        Super User

        dcohare Unfortunately that was the only solution that worked for me. Tried all the other steps, but deleting is the easiest and quickest to get the data loading again. 

         

        When there is a custom report, I usualy make a backup and repoint to the new Semantic Model created.

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi dcohare 
    Welcome to the Microsoft Fabric Community.
    Below are the steps that might resolve your issue.

    •  Check data source credentials → Go to Workspace > Usage metrics report dataset > settings > data source credentials, update and save.
    • Manually refresh the dataset → Click Refresh Now, then check Refresh History for errors.
    • Verify report connection → Open the report, go to transform data > data source settings, ensure it’s linked correctly.
    • Clear query cache → In report settings, clear cache and refresh again.
    • Republish → If issues persist, try ro republish from Power BI Desktop 

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    Thanks
    Cheri Srikanth
    Community Support Team

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi dcohare 
    Thank you for providing the confirmation. I appreciate your support and assistance with this matter. If you have any new queries or require further clarification, please feel free to post them in the community forum.

    If you found the above information helpful, we kindly request you to give us a Kudos and mark the response as the Accept as solution.

    Thank you,
    Cheri Srikanth

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi dcohare 
    It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
    If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
    Looking forward to your reply!

    Thanks 
    Cheri Srikanth

    • dcohare's avatar
      dcohare
      Helper I

      I didn't accept as a solution because I can't delete the entire report and recreate it. The other solutions haven't worked. Thanks!

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi dcohare 
    We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
    Thank you,
    Cheri Srikanth.

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi dcohare 

    Sorry the late response and inconvenience caused.

    If you prefer not to delete the dataset, you can trigger a refresh using the Power BI REST API.

     

    Please follow the below steps to refresh using the API.

    • Register an App in Azure AD. 
    • Get Workspace & Dataset ID from service.
    • Trigger Refresh using below PowerShell.

    ******************************************************** 

     $clientId = "YOUR_CLIENT_ID"

    $clientSecret = "YOUR_CLIENT_SECRET"

    $tenantId = "YOUR_TENANT_ID"

    $workspaceId = "YOUR_WORKSPACE_ID"

    $datasetId = "YOUR_DATASET_ID"

     

    # Get Access Token

    $tokenUri = "https://login.microsoftonline.com/$tenantId/oauth2/token"

    $body = @{

    grant_type = "client_credentials"

    client_id = $clientId

    client_secret = $clientSecret

    resource = "https://graph.microsoft.com"

    }

    $tokenResponse = Invoke-RestMethod -Uri $tokenUri -Method Post -Body $body

    $accessToken = $tokenResponse.access_token

     

    # Trigger Dataset Refresh

    $headers = @{ Authorization = "Bearer $accessToken"; "Content-Type" = "application/json" }

    $uri = "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/datasets/$datasetId/refreshes"

    $response = Invoke-RestMethod -Uri $uri -Headers $headers -Method Post

    Write-Output "Refresh Triggered"

    *******************************************************

    • Go to Power BI Service → dataset settings and refresh

     

    If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.

    Best Regards,
    Community Support Team _ C Srikanth

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi dcohare 

    It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
    If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
    Looking forward to your reply!

    Best Regards,
    Community Support Team _ C Srikanth.