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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Manuel174102
Creator
Creator

Take decimals out of a table

Hello everyone. 

My source table (The table I  upload in the data manager), which I cannot modify (It is not an excel), has values like this:

34,0000000000000000

So when I make a table in my sheet, and I add the values, they seem huge, but in reaity that is just a 34. 

How could I change that? I want it to be display just like "0"

Should I make a change in the datamanager or in the table in my sheet?

 

Greetings

Labels (1)
1 Solution

Accepted Solutions
Digvijay_Singh

Try something like this may be , Normally in this situation we use num# to interpret the text, as per my test this works but not sure if your locale format is same as mine for decimal, thousand etc - 

=num(Subfield(Value,',',1) &'.' & subfield(Value,',',2),'#.##','.')

Digvijay_Singh_0-1660311940930.png

 

Digvijay_Singh_1-1660311968507.png

 

View solution in original post

9 Replies
Digvijay_Singh

I think you should be able to format the field in the data manager or in the chart expression. I just tried this below sample like this. I don't use data manager that often, I am a script editor fan 🙂

Digvijay_Singh_0-1660308260358.png

Test:
Load * inline [
Value
'34,000000000'
'35,000000000'
'36,000000000'
'37,000000000'
'38,000000000'
]

Manuel174102
Creator
Creator
Author

Thanks! 

And what if I have a 3,7500000? How do I change it so I have only 3,75? 

Or a date that is represented like 24.06.2014 00:00:00, if I only want 24.06.2017?

Digvijay_Singh

Do you have timestamp, decimal values all mixed together in the same field? How is that field being used? as a Date or a number? Based on different value types you need to frame your logic and it wouldn't be easy to identify without knowing how many different formats you got. If you share sample data, may be someone will be able to give you a logic that can fit your needs. 

Manuel174102
Creator
Creator
Author

Ok, I have something like this

 

Number Date
3,75000000 11.01.2021 00:00
10,00000000 17.09.2022 00:00

 

And I want it to look like this

Number  Date
3,75 11.01.2021
10,00 17.09.2022

 

Thanks for answering!

Manuel174102
Creator
Creator
Author

i found the solution to the date problem, but to the number i did not 😞

Digvijay_Singh

Try something like this may be , Normally in this situation we use num# to interpret the text, as per my test this works but not sure if your locale format is same as mine for decimal, thousand etc - 

=num(Subfield(Value,',',1) &'.' & subfield(Value,',',2),'#.##','.')

Digvijay_Singh_0-1660311940930.png

 

Digvijay_Singh_1-1660311968507.png

 

Digvijay_Singh

Manuel174102
Creator
Creator
Author

It is still not working for me, when I write that all i get is - . 

But I really appreciate u helping me out

Digvijay_Singh

If possible can you share a sample app, I am sure someone will figure out the solution for you..