Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rido1421
Creator III
Creator III

Creating a dimension from 4 different field names

Hi There

I have 4 fields

Each field has Numerical values  in them.

I would like to create one field from the 4 and call it Age_Group.

so that I could use this as the Dimension in a Pie chart.

      QUANTITY_3_MONTHS,
     QUANTITY_3_TO_6_MONTHS,
     QUANTITY_6_TO_12_MONTHS,
     QUANTITY_12_MONTHS_PLUS

What is the simplest way to do this?

Your assistance is appreciated.

Thanks.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Probably a CrossTable load:

CrossTable(Age_Group,Value)

LOAD

    SomeKeyField,

     QUANTITY_3_MONTHS,

     QUANTITY_3_TO_6_MONTHS,

     QUANTITY_6_TO_12_MONTHS,

     QUANTITY_12_MONTHS_PLUS

FROM ....

;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Probably a CrossTable load:

CrossTable(Age_Group,Value)

LOAD

    SomeKeyField,

     QUANTITY_3_MONTHS,

     QUANTITY_3_TO_6_MONTHS,

     QUANTITY_6_TO_12_MONTHS,

     QUANTITY_12_MONTHS_PLUS

FROM ....

;


talk is cheap, supply exceeds demand
rido1421
Creator III
Creator III
Author

Hi Gysbert

This is how I did it... do you think I could run into any problems doing it this way?

I have validated the the values they seem good.

I will try the crosstable in a bit its clearly much simpler.

Load



    
TONS_3_MONTHS as Ton_Value,

     'TONS_3_MONTHS'
as AgeGroup,

    
AgeItemKey

    
Resident Daily_Stock_On_Hand;



Concatenate    

Load    

     
TONS_3_TO_6_MONTHS as Ton_Value,

     'TONS_3_TO_6_MONTHS'
as AgeGroup,

    
AgeItemKey

    
Resident Daily_Stock_On_Hand;



Concatenate    

Load



      
TONS_6_TO_12_MONTHS as Ton_Value,  

        'TONS_6_TO_12_MONTHS'  
as AgeGroup,

      
AgeItemKey

        
Resident Daily_Stock_On_Hand;

        

Concatenate        

Load



       
TONS_12_MONTHS_PLUS as Ton_Value,  

        'TONS_12_MONTHS_PLUS'  
as AgeGroup,

       
AgeItemKey

        
Resident Daily_Stock_On_Hand;

Gysbert_Wassenaar

No, that's a perfectly valid way to do it as well.


talk is cheap, supply exceeds demand