Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
danellehee084
Contributor II
Contributor II

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
laddu_927
Specialist
Specialist

Can you share some screenshots of the data and issue?

danellehee084
Contributor II
Contributor II
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.

laddu_927
Specialist
Specialist

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
danellehee084
Contributor II
Contributor II
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!