Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show customized records base on conditions in Chart Object

Hello,

I have a field called "Initial/Follow-up" which associate with "Case ID" etc. The records in this field are number. "0" means "Initial", "1...to other number" means "Follow-up times", like this,

Initial/Follow-up

          0

         1

         0

         2

         5

         0

I would like to show "Initial" and "Follow-up num" as the record values, such as

Initial/Follow-up

         Initial

         FU#1

         Initial

         FU#2

         FU#5

         Initial

I created expression for the "Initial/Follow-up" field, if([Initial/Follow-up]=0,'Initial','FU#' & [Initial/Follow-up]) . But this doesn't work for Follow-ups, shows as below,

What can I do to get the FU number?

Thanks,

Becky

22 Replies
swuehl
MVP
MVP

Good that you've found a solution to your problem.

If your request is resolved, then please close this thread (e.g. by selecting an answer as correct or setting the thread to 'Assumed answered').

Just as a side note:

An INLINE table is often used to create some sample records, to demonstrate a possible solution missing sample records by the OP.

Any suggested solution posted here to the forum may not be 100% fitting into your setting, so it's vital to understand how the suggested suggestion should work in principle, then adapt to your setting (which you have done by applying the script code line to your LOAD statement).

Regards,

Stefan

Not applicable
Author

Thanks Stefan,

I just closed this thread. When you mentioned Inline table, what does this mean " to demonstrate a possible solution missing sample records by the OP"?

swuehl
MVP
MVP

As a creator of a thread, it's good to post some sample records for the readers to look at and to demonstrate your data model and data values. You can do this by creating a sample QVW or e.g. excel tables and post these as attachments to your post.

You can also create an INLINE table with your sample records, this can be copy and pasted to the script editor.

What you should try to avoid:

- Posting only screenshots of table boxes or table charts (because then we need to recreate the data manually if we want some data to play with and validate a solution).

- Only describing data in words (seeing the real data values and the relation to other fields / values might be essential).

[I put only in italics because you can of course post these information in addition to other information like sample files]

Sunny has copied your few sample values into an INLINE table just to demonstrate a possible solution (I said '.. missing sample records by the OP', because you (the original poster/ OP) have posted some sample values, but as you've noticed, this did not seem to represent your data model / data), assuming how your data model and data looks like.

But this might not be close enough to your real setting.

That's why I mentioned that one shouldn't expect any suggested solution to fit 100% his needs.

Regards,

Stefan

Not applicable
Author

Oh, I see. Thanks for your suggestions.  I will try to be more accruate while posting questions based on your ideas.

Best,

Becky

Not applicable
Author

Hi Sunny, worry for the confusion.

sunny_talwar

Worry for the confusion??? Not sure I understand...

swuehl
MVP
MVP

yun bai wrote:

Hi Sunny, worry for the confusion.

no worries

Thanks for setting Sunny's answer as correct answer, I think that's what it is.

Not applicable
Author

I meant "sorry" not worry...:)

Not applicable
Author

Hi Stefan,

Since you mentioned Inline load, I would like to ask you more about Inline load.

I posted this thread and you helped me solve the issue. I know that I can use Inline load, if I would like to list values in specific order in the same Data field. After went to QlikView Help -- "Inline load", and some threads, I am still confusing when (or some common scenarios) I should use Inline load.

Thanks,

Becky

Customize sort order

swuehl
MVP
MVP

Your LOAD statement needs an input table source to work upon.

You can specify this source using FROM, specifying a table file, or you can use INLINE to specify the table in the script itself.

That's basically all (there is also AUTOGENERATE, but that's a different story for now).

So, instead of loading your data from e.g. an Excel table file,

...

FROM Excel.xlsx (...);

you can use INLINE to define the table  like

...

INLINE [

FieldName1, FieldName2

Value1, Value2

Value3, Value4

];