Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
erikkorme
Contributor III
Contributor III

Decimals are treated as Money

Hi,

In my fact table I have several number fields that in my database are encoded as decimal(23,2). When I load them into my model, they are all interpreted and read as Money and formatted thereafter. I want them to be treated as the regular decimal numbers they are and be presented as such. I.e.: "95,85" not "kr 95,85".

Both my database and my Qlik-document have comma as decimal separator. My suspicion is that Qlik expects my fields are to be formatted as Money due to the two decimals. I do want to keep both decimals as a regular number, fixed to to 2 decimals.

Did anyone encounter this or have a suggestion to a better fix than manually setting the format of the fields either in script or document settings?

Some examples of numbers:

-281

-42,37

-38,7

0,24

0

1,17

13

95,85

Thanks!

Labels (1)
4 Replies
PrashantSangle

Hi,

Use num()

or in UI

If you are taking it in List box then go to

List Box property->Number tab->override it to expected format.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
MK_QSL
MVP
MVP

Load in the script as below

Num(Field,'#,##0.00') as Field

erikkorme
Contributor III
Contributor III
Author

Hi,

Thanks for your replies. But I was asking if anyone has any ideas other than changing all problematic fields in the script, with the num() function, or changing them through document settings or item properties. I want Qlikview to somehow understand that these fields are not money, but regular numbers, without doing so explicitly. It is doable, but the script will be a lot less clean that way.

Thanks!

jagan
Partner - Champion III
Partner - Champion III

Hi,


Try like this


=Num(Num#(FieldName,'#,##0,00', ',') , '#,##0,00')


Ex:

=Num(Num#('95,85','#,##0,00', ',') , '#,##0,00')

Regards,

Jagan.