Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
anisha_nan
Contributor II
Contributor II

Text to num

Hi,

I have tried with the 2-3 syntax for my two cases:

1. num(num#(Plant)). in this it gives below output

anisha_nan_0-1617621768789.png

But for 99000000000 record it should display 99E9 , for 9e+62 it should show 9E62 and for 30E2 it should show 3000.

2. =IF( ISNUM(TEXT(NUM#(Plant))) , NUM(NUM#(Plant)), TEXT(NUM#(Plant)) ) 

anisha_nan_1-1617621911527.png

 

3. text(num#(Plant))

anisha_nan_2-1617621965984.png

4. text(num(Plant))

anisha_nan_3-1617622039396.png

 

Now i want that it Qlik should pick for the below cases:

1. 9e+62 case it should display as 9E62

2. 99000000000 it should display as 99E9

3. 30E2 it should display as 3000

Can anybody help me out where is need to correct myself. 

@sunny_talwar ; @Anil_Babu_Samineni ; @swuehl

Regards

 

1 Reply
Dalton_Ruer
Support
Support

IF(Plant > 9999, text(num#(Plant)), text(num(Plant))

Assuming that any number <= 9999 should displayed as the number like you wanted for 3000 example. Not sure what your data field type is for plant, but you probably can get away with just text(Plant) for the else condition.  Or just Plant if the field is already text. 

This would be a good code to put in your data model if you have a lot of values so the CPU work is only done at the load time and your UI can just display the field.