Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
im using this custom visual template : https://github.com/microsoft/powerbi-visuals-gantt/blob/master/capabilities.json
This works fine!
In addition to the categorical filter i need to insert data without filtering, thats why i need an additional table!?
The Import data has only one column and 10 rows.
Just to be clear: An array in code with 10 indeces could solve this!
What i tried:
I add a new field "mydataset" to role and table to the existing capabilities.json
But i cant acces my data: -> "dataView.table "is null
{
"dataRoles": [
{
"name": "Legend",
"displayName": "Legend",
"displayNameKey": "Role_Legend",
"kind": "Grouping"
},
{
"name": "Task",
"displayName": "Task",
"displayNameKey": "Role_Task",
"kind": "Grouping"
},
{
"name": "My Data Set",
"displayName": "mydataset",
"displayNameKey": "Role_mydata",
"kind": "Grouping"
},
{
"name": "Parent",
"displayName": "Parent",
"displayNameKey": "Role_Parent",
"kind": "Grouping"
},
.....
....
...
"categorical": {
"categories": {
"select": [
{
"for": {
"in": "Task"
}
},
{
"for": {
"in": "Parent"
}
},
{
"for": {
"in": "StartDate"
}
},
{
"for": {
"in": "Resource"
}
},
{
"for": {
"in": "ExtraInformation"
}
},
{
"for": {
"in": "Milestones"
}
}
]
},
"values": {
"group": {
"by": "Legend",
"select": [
{
"for": {
"in": "EndDate"
}
},
{
"for": {
"in": "Duration"
}
},
{
"for": {
"in": "Completion"
}
}
]
}
}
}
} , {
"table": {
"rows": {
"for": {
"in": "mydataset"
}
}
}
}
],
"objects": {
"general": {
"displayName": "General",
"displayNameKey": "Visual_General",
"properties": {
"groupTasks": {
"displayName": "Group Tasks",
"displayNameKey": "Visual_GroupTasks",
"type": {
......
.....
"matrix" : null,
"table" : null,
...
categorical: {...}
Edit:
I think is not possible to use more then one dataviewmapping like categorical and table.
Please let me know if I'm wrong.
Thanks
Hi @Anonymous,
You can only use one dataViewMapping in a custom visual, so you need to think about which one best suits your need to get the data into the visual to begin with. Once it's in there, you can transform it into a suitably-shaped view model to fit your visual logic.
If you're able to provide an overview of what your goals are, I might be able to suggest what your dataViewMapping and dataRoles need to look like. From where you're starting off, it looks like you're trying to produce gantt-like functionality? If you have any sample data and what your expected output is, this would be a great help in figuring out the best way to assist. Custom visuals can be somewhat open-ended so anything that can clarify what success looks like will hopefully avoid as much ambiguity up-front as possible.
Cheers,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi,
thanks for support.
The Date is filtered with a timeline slicer. This causes my records to be filtered by date as well.
But I need in my custom visual additional records that are not filtered by date but by another value. Like the option "Show item with no data" but this has no effect, on my datarole field
Example:
I need to visualise the "blue" entries -this works!
But i also need entries only filtered by Table2.Teams ("green"). How can I access the same Team (blue green) entries without being affected by the date filter?
Table1
Name | Task | Starttime | Endtime | Team |
Testuser1 | Task1 | 1/12/2019 | 20/12/2019 | Team1 |
TestUser1 | Task2 | 22/12/2019 | 30/12/2019 | Team1 |
TestUser3 | Task0 | 1/11/2019 | 3/11/2019 | Team1 |
TestUser2 | Task7 | 1/11/2019 | 3/11/2019 | Team2 |
Table2
TeamName | additonal fields |
Team1 | entry1 |
Team2 | entry2 |
You right its better to rebuild the whole model.
In my case i found a way to solve this, i changed "group" by selection from Legend to Task.
Now data is no longer filtered by legend but it my case that helps and i get all the records I need.
"values": {
"group": {
"by": "Task",
"select": [
{
"for": {
"in": "EndDate"
}
},
{
"for": {
"in": "Duration"
}
},
{
"for": {
"in": "Completion"
}
}
]
}
}
}
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |