Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
dumpydata
New Member

table data view mapping stops working when I try add to add conditions or requiredTypes

I am building a custom visual using api version 5.1.0 and I am losing my mind over this. I have read the documentation over and over and I feel like it should work. If i remove all the "conditions" and all the "requiredTypes" and "preferedTypes" it works. In some combinations it DOES work, but the road_number column is all set to null.
 
```json
"dataRoles": [
        {
            "displayName":"Road",
            "name":"road_number",
            "kind":"Grouping",
            "requiredTypes" : [{"text": true}],
            "preferredTypes": [{"text": true}]
        },
        {
            "displayName":"SLK From (km)",
            "name":"slk_from",
            "kind":"Grouping",
            "requiredTypes" : [{"numeric": true}],
            "preferredTypes": [{"numeric": true}]
        },
        {
            "displayName":"SLK To (km)",
            "name":"slk_to",
            "kind":"Grouping",
            "requiredTypes" : [{"numeric": true}],
            "preferredTypes": [{"numeric": true}]
        },
        {
            "displayName":"Carriageway",
            "name":"cwy",
            "kind":"Grouping",
            "requiredTypes" : [{"text": true}],
            "preferredTypes": [{"text": true}]
        },
        {
            "displayName":"Offset",
            "name":"offset",
            "kind":"Grouping",
            "requiredTypes" : [{"numeric": true}],
            "preferredTypes": [{"numeric": true}]
        }
        ,
        {
            "displayName":"Colour",
            "name":"colour",
            "kind":"Grouping",
            "requiredTypes" : [{"text": true}],
            "preferredTypes": [{"text": true}]
        }
],
"dataViewMappings": [
        {
           
           "conditions": [{
                    "road_number":{"max": 1, "min":1},
                    "slk_from":{"max": 1, "min":1},
                    "slk_to":{"max": 1, "min":1}
                }],
            "table": {
                "rows": {
                    "select": [
                        {"bind": {"to": "road_number"}},
                        {"bind": {"to": "cwy"}},
                        {"bind": {"to": "slk_from"}},
                        {"bind": {"to": "slk_to"}},
                        {"bind": {"to": "offset"}},
                        {"bind": {"to": "colour"}}
                    ]
                }
            }
        }
    ],
 
```
 
Depending on the constraints I remove, the visual sometimes fails to call the "update" function, or the "update" function is called, but on inspecting the dataview I see:
 
```json
"rows": [
                [
                    0, <--slk_from is numeric and works fine
                    2, <-- slk_to is also fine
                    {}  <-- I expect text here like "H015"... but when i read it in javascript this is null
                ],
                [
                    3,
                    5,
                    {}
                ],
                [
                    4,
                    7,
                    {}
                ],
                [
                    4,
                    8,
                    {}
                ]
            ]
```
This makes no sense as I have carefully verified that all my test data is valid and all constraints are met.
Please, any help or hints would be very much appreciated 🙂
0 REPLIES 0

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors