Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to represent data in an intermediate version between the pivot table and a straight table?

Is it possible to represent data in an intermediate version between the pivot table and a straight table?

1 Solution

Accepted Solutions
Not applicable
Author

Instead of [{d}] Try '$(d)'

Kiran.

View solution in original post

5 Replies
Not applicable
Author

Can you detail your requirements with an example?

Kiran.

Not applicable
Author

Hi Kiran .

My English is not good, but I try explain what I want to see.
In example
I get Data from function hierarchy in new table "TableOfHierarcy" .
And fields name1, name2, name3 ... may be n count.
Where field (name3, name4 or other) is empty, pivot table sum not represented.
I want create new table "TableOfHierarcy_2" with new fields by formula:

TableOfHierarcy_2.new_name1 = TableOfHierarcy.name1
TableOfHierarcy_2.new_name2 = TableOfHierarcy.name1 & ' ' & TableOfHierarcy.name2
TableOfHierarcy_2.new_name3 = TableOfHierarcy.name1 & ' ' & TableOfHierarcy.name2 & ' ' & TableOfHierarcy.name3

But I don't know how create this formula, because I don't know how much table "TableOfHierarcy" have fields (name1, name2,name3 and other)

Next step I want create new group from table "TableOfHierarcy_2"

Best regards Vilgis

Not applicable
Author

What wrong in this script?

TableOfHierarcy:hierarchy (ID, ParentID, Name, 'ParentName', Name, 'Path', '|', 'Depth')

load
    
ID,
    
ParentID,
    
Name

resident TableOfNodes;


LET a = NoOfFields('TableOfHierarcy');

LET b = 1;

LET c = '';

LET d = '';

for b = 1 to a-6
    
c = c & ' name' & $(b) & ' as new_name' & $(b) &' ,'
    
NEXT

LET d = left(c,len(c)-1);    


TableOfHierarcy2:

load
    
ID,
    
ParentID,
    
Name,
    
ParentName,
    
Path,

    
[{d}],

    
Depth

resident TableOfHierarcy;

Not applicable
Author

Instead of [{d}] Try '$(d)'

Kiran.

Not applicable
Author

Thanks Kiran .

You help me very much .

Best regards Vilgis