Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am having a go at creating a custom visual, it all seems to be going okay although in one of my tables I have 300+ rows of data. When looking at the array in the data view array it always only reaches 100, I have tried a few different things and wasted some hours.
An example of the code broken down.
public update(options: VisualUpdateOptions) {
let dataView_: DataView = options.dataViews[0];
for (var j = 0; j < dataView_.table.rows.length; j++) {
console.log(j)
}
Thank You
Brenton Collins
Solved! Go to Solution.
Hi @BrentonC, and thanks for confirming 🙂
From reviewing your capabilities, there are two issues and have pasted a working version underneath.
Here's a working version of your capabilities - this works for the default maximum of 1,000 data points:
{
"dataRoles": [
{
"displayName": "CCFV",
"name": "category1",
"kind": "Grouping"
}
],
"dataViewMappings": [
{
"conditions": [
{
"category1": {
"max": 1
}
}
],
"table": {
"rows": {
"for": {
"in": "category1"
}
}
}
}
]
}
Confirming output from my console (last value is 999, as for loop is indexed from 0):
Hopefully that's all you need to get moving. Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @BrentonC,
WIthout seeing your capabilites.json I'd first suggest checking the data reduction algorithm. The doc says that there's a limit of 1,000 data points by default but if you have 10 categories x 100 rows then this will likely be your issue. Setting this limit appropriately should get you to where you need to be.
If not, would you be able to share your capabilites.json file contents here, so we can see how your dataView is being built? This can help with the next stage of diagnosis if we need to go further.
Thanks,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thank you for the reply,
I did originally have 10+ columns, although I changed the format fo the data and now there are just 3 columns.
{
"dataRoles":[
{
"displayName": "CCFV",
"name": "category1",
"kind": "Grouping"
}
],
"dataViewMappings": [
{
"conditions": [
{
"category1": {
"max": 1
}}
],
"table": {
"rows": {
"for": {
"in": "Rows"
}}
},
"matrix": {
"rows": {
"for": { "in": "Rows" }
},
"columns": {
"for": { "in": "Columns" }
},
"values": {
"for": { "in": "Values" }
}
},
"categorical": {
"values": {
"select": [
{ "bind": { "to": "category1" } }
]
}
}
}
]}
Before and after adding in the data reduction algorithm I am still receiving the same result.
Structure to the dataset
Thank You
Brenton
Hi @BrentonC, and thanks for confirming 🙂
From reviewing your capabilities, there are two issues and have pasted a working version underneath.
Here's a working version of your capabilities - this works for the default maximum of 1,000 data points:
{
"dataRoles": [
{
"displayName": "CCFV",
"name": "category1",
"kind": "Grouping"
}
],
"dataViewMappings": [
{
"conditions": [
{
"category1": {
"max": 1
}
}
],
"table": {
"rows": {
"for": {
"in": "category1"
}
}
}
}
]
}
Confirming output from my console (last value is 999, as for loop is indexed from 0):
Hopefully that's all you need to get moving. Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thank you very much for the detailed explanation, I messed around so much with it I think I got lost in where I was at. Understanding the fundamental reasons it was broken is a big help!
Thank You
Brenton
No probs - it's very easy to get all turned around in there. Still happens to me a lot 😉 Glad you're sorted!
All the best,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |