Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jphillipsepg
New Contributor

Using the Subfield as part of the field name

Using Qlik Sense,

I'm performing a SubField function on an IT database.  Regretfully, all the drive information is contained within the same field.  I would like to Integrate the Subfield answer into part of the Field name.

Currently have the following

     If("Drive Count">1,SubField(Drives, ' ', 14),'NA')                                                  as "Drive 2 Letter",

     If("Drive Count">1,SubField(Drives, ' ', 18)&' GB',0)                                       as "Drive 2 Size",

     If("Drive Count">1,SubField(Drives, ' ', 23)& 'GB',0)                                       as "Drive 2 Free",

Lets pretend the Drive Letter is D,  I would just like the As to be “Drive E Size” and “Drive E Free”

     If("Drive Count">1,SubField(Drives, ' ', 18)&' GB',0)                                       as "E" & " Size",

     If("Drive Count">1,SubField(Drives, ' ', 23)& 'GB',0)                                       as "E" & " Free",

Hopefully that makes sense…

4 Replies
krishna_2644
Valued Contributor III

Re: Using the Subfield as part of the field name

So you want the the size that is calculated in of and subfield statement to be in your field name?

Re: Using the Subfield as part of the field name

You have an option to create this as a field with values and then use The Generic Load to convert into field names... but why would you want to do that? I mean how many different combinations are possible? You will end up with so many fields for each combination of Drive and Letter... is that what you really want? or you can show your result in a pivot table?

Re: Using the Subfield as part of the field name

I think I would load this field how it is, store it within a textfile (load per from_field would be also possible) and then loading the textfile like any other flat-table with a quite normal data-structure.

- Marcus

wdchristensen
Contributor III

Re: Using the Subfield as part of the field name

What type of database? 

Community Browser