Powershell Donut Error Message

Hi again,
using the powershell donut tile I run in the following error:

“A value column and a label column are mandatory in the script results, please modify your script.”

The scripts works, the “response data” section shows exacly tha output I expected.


image

Any ideas? Thanks in advance!
Frank

Hi Frank

Whenever I’ve had this it has been because the value column turned out to be a String rather than a numeric datatype such as Int32. It’s probably worth checking by calling the getType() method on your Number column variable and making sure it’s not a String.

Hi,
exactly, the value ist a string, that seemed to be the problem.
thx!

… unfortunately I don’t how to proceed now. Do I have to modify the script which creates the csv-output, or do I have to modify the script within the tile?

It looks like you can probably modify the tile script to cast the Number field to an Integer using the example here: powershell - Converting data types when using Import-CSV - Stack Overflow

I did this with some test data and it seemed to work: