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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

Issue with formating

Hi All,

I am struggling in performing sum function as QlikView is not understanding the format.

I have numbers in the below format:

   

00000000123456

00000003456789.

When I try to add both the numbers I get 0.

Can any one please explain me how to add these two numbers?

Thanks in advance!

Cheers,

Varun Reddy

1 Solution

Accepted Solutions
sunny_talwar

I think you have 14 digit number and that is what is causing issue. May be you want to try removing a 0 and see if that helps

Num#(Right([Total Associated Financial Measure Value], 13)) as [Total Associated Financial Measure Value]

View solution in original post

15 Replies
sunny_talwar

Do you want to keep the 0s in the front after the addition also? May be like this if you don't want the 0s

Num#(Number1) + Num#(Number2)

varunreddy
Creator III
Creator III
Author

Sunny,

Those two values are from same field.

I tried this:

num#([Total Associated Financial Measure Value]) as [Total Associated Financial Measure Value]

In front end, I tried:

Sum(Total Associated Financial Measure Value] ).

It didn't work. I get 0.

sunny_talwar

How about when you try this:

[Total Associated Financial Measure Value] * 1 as [Total Associated Financial Measure Value]

varunreddy
Creator III
Creator III
Author

I am getting this:

sunny_talwar

I think you have 14 digit number and that is what is causing issue. May be you want to try removing a 0 and see if that helps

Num#(Right([Total Associated Financial Measure Value], 13)) as [Total Associated Financial Measure Value]

varunreddy
Creator III
Creator III
Author

Sunny,

Can you explain what it is doing?

If I have 000000000000074.75, it is rounding it to 75. What exactly it is doing and we are hardcoding the number to 13. Can you please explain?

sunny_talwar

Because QlikView have issue in reading numbers which are more than 14 digits, I am just keeping the last 13 digits (ignoring the 1st zero). For the rounding, have you tried

Num(Num#(Right([Total Associated Financial Measure Value], 13)), '#,##0.00') as [Total Associated Financial Measure Value]

varunreddy
Creator III
Creator III
Author

Yes. It is still rounding.

varunreddy
Creator III
Creator III
Author

Hi Sunny,

Thanks for your response. Is there any  alternative if there are more than 14 digits?

Cheers,

Varun Reddy.