I have the following query that takes an input from an IoT weather station and outputs to Power Bi:
WITH machinelearning AS (
SELECT EventEnqueuedUtcTime, Temperature, Humidity, WindSpeed, WindGust, Pressure, Rain, machinelearning(Temperature, Humidity, Pressure) as result from [CwrtCelynWeather]
)
Select WindSpeed, WindGust, CAST (result.[Pressure] AS FLOAT) AS Pressure, Rain, System.Timestamp time, CAST (result.[temperature] AS FLOAT) AS temperature, CAST (result.[humidity] AS FLOAT) AS humidity, CAST (result.[Scored Probabilities] AS FLOAT ) AS 'probabalities of rain'
Into [weatherPBi2]
From machinelearning
My question is how would i convert the following to a percentage?
CAST (result.[Scored Probabilities] AS FLOAT ) AS 'probabalities of rain'
At the moment it returns a decimal of 0.45, but i want to have it send 45.0. I have tried the following:
CAST (result.[Scored Probabilities] AS FLOAT ) *100 AS 'probabalities of rain'
&
CAST (result.[Scored Probabilities*100] AS FLOAT ) AS 'probabalities of rain'
But the streaming analytics complains.
Any help would be appreciated
Thanks
Kevin
Just in case anybody else runs into the same problem, here is my solution:
100 * CAST (result.[Scored Probabilities] AS FLOAT ) AS 'probabalities of rain'
This worked fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.