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

When string declared static string in stored procedure, loses formatting in Qlik

Hello,

I currently load from a stored procedure. Recently, the strings in a particular field were declared as static strings in the database. I use these strings to format numbers in Qlik (e.g., if (Category = 'Bananas'), Num(Sum(Value), '#,##0').)

Now, the values don't populate in my table so if (Category = 'Bananas'), Num(Sum(Value), '#,##0') = null because the if condition is ostensibly not satisfied.

The field still comes in accurately and is associated with the correct values. It seems like the field values are not read in correctly just when an if statement.

Has anyone run into this issue before and found a workaround? I've tried wrapping the field in Text() and re mapping the values with no luck.

Thank you in advance!

6 Replies
Anonymous
Not applicable
Author

Can you share some screenshots of the data and issue?

Anonymous
Not applicable
Author

Unfortunately, the data is confidential so I can't.

The strings appear exactly how a normal string would appear in Qlik and they respond to list box selections as normal. The only problem that I'm seeing is when used in an if statement, Qlik doesn't read in the condition.

Thank you.

Anonymous
Not applicable
Author

Am not sure if wats happening with the if statement. How about trying if (Match(Category),'Bananas'), Num(Sum(Value), '#,##0').)??

rahulpawarb
Specialist III
Specialist III

Hello Danelle,

Trust that you are doing well!

The desired if statement is:

if (Trim(Category) = 'Bananas', Num(Sum(Value), '#,##0'))

Pleas correct me If I misunderstood.

Hope this will be helpful.

Regards!

Rahul

Anil_Babu_Samineni

Now, the values don't populate in my table so if (Category = 'Bananas'), Num(Sum(Value), '#,##0') = null because the if condition is ostensibly not satisfied.

Condition is not accuracy, May be like this?

If(Category = 'Bananas', Num(Sum(Value), '#,##0')) // Here, What are you trying with null. would you describe more this part

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Great idea! But, unfortunately, it didn't work.

Ultimately, we ended up creating a second field that was dual coded and I used the numeric value in the if statement to format the numbers.

Thank you for your help!