PowerBI-tips / tools

General Repo for tracking features, issues and bugs related to the tools developed by PowerBI.tips
3 stars 0 forks source link

Bug - Matrix Has Error when setting Settings via Global - Crashes Power BI #4

Open pugliathomas opened 1 year ago

pugliathomas commented 1 year ago

When setting certain properties from the Global view that can effect mulitple objects, this is causing an error in Power BI.

Power Will Crash

For example, setting the Global property of the following:

  1. Column Grand Total
  2. Grand Total
  3. Grid Layout
  4. Row Grand Total

Will cause Power BI when adding a Matrix to cause a pop up and the following error message:

JS Error Message:
Error wrapper for thrown object: {"innerError":{},"code":"QueryPipelineError","ignorable":false}

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.114.664.0","ModuleName":"https://ms-pbi.pbi.microsoft.com/minerva/scripts/desktopUI.js","Component":"","Error":"Error","MethodDef":"","ErrorOffset":"105:31"}

Code

Global Settings (Crashes Power BI): GlobalConfig_Crashes.txt

Visual Specific (Fine): VisualSpecific_WorksFine.txt

Global Config Errors

The code I have from downloading from Themes Tools is:

    "visualStyles": {
        "*": {
            "*": {
                "columnTotal": [
                    {
                        "fontColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "ThemeDataColor": {
                                            "ColorId": 0,
                                            "Percent": 0
                                        }
                                    }
                                }
                            }
                        },
                        "fontFamily": "Segoe UI"
                    }
                ],
"total": [
                    {
                        "backColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "ThemeDataColor": {
                                            "ColorId": 2,
                                            "Percent": -0.5
                                        }
                                    }
                                }
                            }
                        },
                        "fontColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "ThemeDataColor": {
                                            "ColorId": 0,
                                            "Percent": 0
                                        }
                                    }
                                }
                            }
                        }
                    }
                ],

                "rowTotal": [
                    {
                        "backColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "ThemeDataColor": {
                                            "ColorId": 2,
                                            "Percent": -0.25
                                        }
                                    }
                                }
                            }
                        },
                        "fontColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "ThemeDataColor": {
                                            "ColorId": 0,
                                            "Percent": 0
                                        }
                                    }
                                }
                            }
                        }
                    }
                ],
 "columnFormatting": [
                    {
                        "alignment": "Center",
                        "dataBars": {
                            "reverseDirection": false
                        }
                    }
                ]

Visual Only (Works Fine)

This does not cause any errors when setting values for the MAtrix Visual itself:

Details ```json "pivotTable": { "*": { "columnTotal": [ { "backColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 2, "Percent": 0 } } } } }, "fontColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 0, "Percent": 0 } } } } }, "applyToHeaders": true } ], "total": [ { "backColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 2, "Percent": -0.25 } } } } }, "fontColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 0, "Percent": 0 } } } } }, "applyToHeaders": true } ], "rowTotal": [ { "backColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 4, "Percent": -0.25 } } } } }, "fontColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 0, "Percent": 0 } } } } }, "applyToHeaders": true } ], "columnHeaders": [ { "alignment": "Center", "backColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 17, "Percent": 0 } } } } }, "fontColor": { "solid": { "color": { "expr": { "ThemeDataColor": { "ColorId": 2, "Percent": 0 } } } } }, "outline": "BottomOnly" } ], "grid": [ { "gridHorizontal": true, "gridVertical": true } ] } }, ```