Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I have a problem creating a Scorecard using API, the scorecard appears and it seems to be ok but 5 seconds later the link won't work and I can't add goals later, I would like to know how to create one successfully.
If anyone can help I'll appreciate. Thanks
With Postman I made a POST to https://api.powerbi.com/v1.0/myorg/groups/{WorkspaceId}/scorecards/
Headers
Content-Type application/json
Authorization Bearer access_token
With this Body JSON
Solved! Go to Solution.
Hi, @Chaffardet
Thanks for reaching out to the Microsoft fabric community forum.
Based on my practical tests, I recommend separating the creation of the scorecard from the creation of the objectives:
1.First, create the scorecard:
Call the following API:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/scorecards
Here is my example body:
{
"name": "Scorecard Test2",
"contact": "yy@xx.com",
"permissions": "ReadWrite",
"localTimeZoneId": "UTC",
"statuses": [
{
"id": 0,
"displayName": "Not started",
"color": "#F3F2F1",
"historical": false
},
{
"id": 1,
"displayName": "On track",
"color": "#DFF6DD",
"historical": false
},
{
"id": 2,
"displayName": "At risk",
"color": "#FFF4CE",
"historical": false
},
{
"id": 3,
"displayName": "Behind",
"color": "#FDE7E9",
"historical": false
},
{
"id": 4,
"displayName": "Overdue",
"color": "#FED9CC",
"historical": false
},
{
"id": 5,
"displayName": "Completed",
"color": "#CCDEFF",
"historical": false
}
],
"columnSettings": [
{ "columnId": 0, "show": true },
{ "columnId": 1, "show": true },
{ "columnId": 2, "show": true },
{ "columnId": 3, "show": true },
{ "columnId": 4, "show": true },
{ "columnId": 5, "show": true },
{ "columnId": 6, "show": true },
{ "columnId": 7, "show": false },
{ "columnId": 8, "show": false },
{ "columnId": 9, "show": false },
{ "columnId": 10, "show": true }
]
}
The result is as follows:
2.Next, create the objectives:
Call the following API:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/scorecards({scorecardId})/goals
Here is my example body:
{
"goalId": 2,
"name": "Achieve Sales Target2",
"description": "Achieve sales targets",
"value": 100,
"status": 1,
"completionDate": "2025-12-31"
}
The result is as follows:
3.In my tests, if merged, the api would not recognize goals, resulting in a blank space:
4.For more details, please refer to:
Goals (Preview) - Post - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Scorecards (Preview) - Post - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Chaffardet
Thanks for reaching out to the Microsoft fabric community forum.
Based on my practical tests, I recommend separating the creation of the scorecard from the creation of the objectives:
1.First, create the scorecard:
Call the following API:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/scorecards
Here is my example body:
{
"name": "Scorecard Test2",
"contact": "yy@xx.com",
"permissions": "ReadWrite",
"localTimeZoneId": "UTC",
"statuses": [
{
"id": 0,
"displayName": "Not started",
"color": "#F3F2F1",
"historical": false
},
{
"id": 1,
"displayName": "On track",
"color": "#DFF6DD",
"historical": false
},
{
"id": 2,
"displayName": "At risk",
"color": "#FFF4CE",
"historical": false
},
{
"id": 3,
"displayName": "Behind",
"color": "#FDE7E9",
"historical": false
},
{
"id": 4,
"displayName": "Overdue",
"color": "#FED9CC",
"historical": false
},
{
"id": 5,
"displayName": "Completed",
"color": "#CCDEFF",
"historical": false
}
],
"columnSettings": [
{ "columnId": 0, "show": true },
{ "columnId": 1, "show": true },
{ "columnId": 2, "show": true },
{ "columnId": 3, "show": true },
{ "columnId": 4, "show": true },
{ "columnId": 5, "show": true },
{ "columnId": 6, "show": true },
{ "columnId": 7, "show": false },
{ "columnId": 8, "show": false },
{ "columnId": 9, "show": false },
{ "columnId": 10, "show": true }
]
}
The result is as follows:
2.Next, create the objectives:
Call the following API:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/scorecards({scorecardId})/goals
Here is my example body:
{
"goalId": 2,
"name": "Achieve Sales Target2",
"description": "Achieve sales targets",
"value": 100,
"status": 1,
"completionDate": "2025-12-31"
}
The result is as follows:
3.In my tests, if merged, the api would not recognize goals, resulting in a blank space:
4.For more details, please refer to:
Goals (Preview) - Post - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Scorecards (Preview) - Post - REST API (Power BI Power BI REST APIs) | Microsoft Learn
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.