BookmarkSubscribeRSS Feed
Adelaida
Fluorite | Level 6

Dear all,

I have a problem with the default format sas chooses when I create a Star Schema.
All the fileds with character data type are included with format $100 / $40 even if the type is right, character(100) or character(40).
First I didn't mind but when I tried to build a formula in Analytics Explorer it gave my wrong type error in confronting a character category with a text value. I include an image of my star schema along with the formula I try to build in Analytics Explorer:
IF ( 'DESC_SCENARIO'n = ('BUDGET VERSIONE 1') )
RETURN 'BDG_NET_EUR'n
ELSE 0

Star schema.png

As you can see in the above formula the DESC_SCENARIO is considered as a number type column even if it is a character type column.
I tried to change the format, but there is no way to do this.
What can I do? Why SAS Visual Data Builder choose this format, how can I change this behaviour?
I appreciate any help that you can provide,
Adelaida

1 REPLY 1
Renato_sas
SAS Employee

Hi @Adelaida,

 

What makes you think that DESC_SCENARIO is considered a number?

 

If the reason is because you see the letter n in the expression (e.g. 'DESC_SCENARIO'n), this doesn't mean a number. This n indicates a named data item, which could be calculated or not. These are valid syntax in expressions:

'DESC_SCENARIO'n --> a data item (numeric or character)

'DESC_SCENARIO'p --> a parameter (numeric or character)

'DESC_SCENARIO' --> a string

 

Best,

Renato

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 807 views
  • 0 likes
  • 2 in conversation