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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
My team is editing the pbiviz file for the "KPI Indicator" custom visual to force the visual to the "None" color it the case the data is BLANK. The issue is described below.
https://community.powerbi.com/t5/Desktop/KPI-Indicator-color-for-quot-None-quot-value-does-not-work/m-p/246484
Our solution was to just update the visual itself in the visual.ts file. The questions we are facing in doing this are the following:
1) How does Power BI pass on a BLANK() value in DAX to the visual? We believe it is the `kpiActual` variable but not sure.
2) How does one evaluate that variable, whatever it is, in javascript?
We've tried:
- if (....kpiActual == null) then {....do the coloring.....}
- if (....kpiActual == "undefined" then {....do the coloring...}
- Setting: diffText = "(" + GetKPIActualDiffFromGoal(kpiActual, kpiGoal, this.kpiCurrentSettings.kpi.bandingCompareType, this.kpiCurrentSettings.kpi.indicateDifferenceAsPercent) + ")"
- if (.... diffText != "(Blank)") then {.... do the coloring...}
None of these seem to work! Don't know much Javascript but it is absolutely essential for us to be able to set the color to gray in the case that the KPI Actual Value evaluates to BLANK()
Solved! Go to Solution.
Hi @Anonymous,
If you're attempting to modify a visual that is already published in AppSource, Power BI will always look it up and load it from there, based on its guid. I suggest you try switching on developer mode in Desktop to test the packaged visual, otherwise you'll never see the results of your changes if loading from a .pbiviz.
If this works, you'll then need to change the visual's guid in pbiviz.json to something else, so that it doesn't match the one in AppSource. This way, Power BI Desktop will treat your visual as a separate one and load it.
Bear in mind that because you're doing this, it will no longer treat the visual as certified because it no longer matches AppSource, so if you need these changes incorporating then I'd suggest contacting the developer of the visual to see if they can assist with this or accept your changes.
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
@dm-p , your response was helpful. We were able to successfully modify the KPI Indicator visual by going to developer mode in the PBI Online Service. Changing the GUID was crucial for it to render. Thanks.
Hi @Anonymous,
If you're attempting to modify a visual that is already published in AppSource, Power BI will always look it up and load it from there, based on its guid. I suggest you try switching on developer mode in Desktop to test the packaged visual, otherwise you'll never see the results of your changes if loading from a .pbiviz.
If this works, you'll then need to change the visual's guid in pbiviz.json to something else, so that it doesn't match the one in AppSource. This way, Power BI Desktop will treat your visual as a separate one and load it.
Bear in mind that because you're doing this, it will no longer treat the visual as certified because it no longer matches AppSource, so if you need these changes incorporating then I'd suggest contacting the developer of the visual to see if they can assist with this or accept your changes.
Regards,
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 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |