Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jphillipsepg
Contributor
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
Specialist III
Specialist III

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

sunny_talwar

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?

marcus_sommer

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

What type of database?