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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need help on Cross table?

Hi Folks,

I am unable to create a cross table...plwease need help on this.

I have source table in below crosstable.xls(sheet1)

i need the data like crosstable.xls(sheet2) for all the ID and Name's?

Here i have Null data in sla3,sal4,sal5,sal6 but i want those data  also in my cross table outpiut.

5 Replies
rubenmarin

Hi Rakesh, this script works for me:

CrossTable(Type, Data, 2)

LOAD Id,

     Name,

     sal1,

     sal2,

     sal3,

     sal4,

     sal5,

     sal6

FROM

[.\Croos Table.xlsx]

(ooxml, embedded labels, table is Sheet1);

Not applicable
Author

Tyou but here it's not giving all the values in type(like sal1,sal2,sal3,sal4,sal5,sal6) which i have here

rubenmarin

Sorry, I don't understand the requirements, this is what I get:

What you need?

Anonymous
Not applicable
Author

Hi Rakesh:

Please see the app attached. I have achieved what you wanted exactly, data with null values.

Hope it helps, let me know.

Good luck!

sandeep_sarawgi
Partner - Contributor III
Partner - Contributor III

I had a similar problem and here is what I did to solve it.

First, I added

SET NullValue = '<Unspecified>'  //this was added in the Main tab of the script

NullAsValue *; // for handling nulls as a string <Unspecified>

Then, I first loaded the data from source into a QV table

Tmp:

Load *

From

..... //what ever your data source is

Finally, I performed the cross-table load:

CrossFacts:

Crosstable(Metric,Value, 5)

Load *

Resident Tmp;

Drop Table Tmp;

Sandeep Sarawgi