Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Become an analytics expert with Qlik's new 15 week course: Applied Data Analytics using Qlik Sense. READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bad number format visualization

Hi,

I have a problem with data visualization in QV. I extract data from OraOLEDB.Oracle and the number fields are visualized with a lot of additional zeros after decimal. For example, the field Storage_id  - which is a number - is displayed as 15 in my database but in qlikview as 15,00000000000000000000000....
This visualization is valid both in Preview Table and my objects and it creates me a lot of problem.
I don't understand the reason of it. How can I fix this problem without formatting the number?

Thank you

9 Replies
kaushiknsolanki
Luminary Alumni
Luminary Alumni

Hi,

     Try this function while loading data from your source system.

     Just an example.

load num(num#(Fields)) as Number inline [

Fields

1.00000000000

2.00000000000

3.00000000000

];

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
bill_markham

Cristina

If you don't need any decimal places at all then try:

     Floor( yournumberfiled ) as yournumberfiled )

The QlikView Help explains the floor() function.

Best Regards,     Bill

Not applicable
Author

hi

try this

LOAD *,Left(F1,Index(F1,'.')-1)  as num INLINE [

    F1

    1.0000

    2.0000

    3.0000

    4.0000

];


see attached file.

paulcalvet
Partner
Partner

Hi,

For my part, I did this when I extract data :

LOAD num(`YourField`,'# ##0') AS YourField,

          num(`YourField2`,'# ##0,00') AS YourField2;

SQL Select

SQL SELECT YourField, YourField2 FROM...

Regards

amartinez35
Partner
Partner

Hi,

You can just try :

Load

Field*1 as Field

;

SQL SELECT [...]

Regards

Not applicable
Author

I wouldn't format the field...I was thinking it was something from User Preferences or from

SET ThousandSep='.';
SET  DecimalSep=',';

I have too much fields with this problem and it would take too much time to format it one by one.

Thank you


bill_markham

Cristina

Unfortunately one often does have to do things that do take time.  But on the plus side that that is what keeps people like us in a job.

Getting things formatted properly in your load script and then saving the table in a QVD, allows later multiple re-use in dashboards & is a standard QlikView Best Practice, often referred to as a QVD Layer.

If you google QlikView QVD Layer, you'll get fair few hits explaining how to implement this.

Best Regards,     Bill

Not applicable
Author

simply try this

num(fieldname) as numberfield

Not applicable
Author

You're right, but my problem is why I can't visualize data as they are in my database. Those zeros are very strange.