Convert string into number for customized field

Hi Experts,
I am new with EazyBI and trying to do a scatter plot using below table. but impact and probability are not a number. How to convert it into 4 and 3?

eazybi

Thanks!

Hello @ADAMKEY ,

Check this (create a new measure):

CASE [Measures].[Issue Security Risk Impact].Value
WHEN "4-Very High" THEN 4
WHEN "3-High" THEN 3
-- .....
END
  • or (hopefully you do not have values like ‘10-catastrophical’ :slight_smile: . The example below will return also 1)
Left(  -- <String>, <Integer>
  [Measures].[Issue Security Risk Impact].Value,
  1  
)

Hope it helps!

Kind regards,
Vasile S.

2 Likes

HI @ADAMKEY

Both solutions shared by @VasileS are great, use which one suits you the best. Thank you Vasile for being a great community member!
The only thing with the syntax - you do not need to use function Value in them, as it returns a numeric value, while you need to process strings in both calculations:

CASE [Measures].[Issue Security Risk Impact]
WHEN "4-Very High" THEN 4
WHEN "3-High" THEN 3
-- .....
END

and

Left(  -- <String>, <Integer>
  [Measures].[Issue Security Risk Impact],
  1  
)

Best,
Ilze , support@eazybi.com

2 Likes

Thank you llze, I will try this solution as well!!

Thanks VasileS, It works!!

2 Likes

any idea why i am getting this error:

I get the same error.