Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Arjunarao
Honored Contributor II

CROSSTABLE Vs CrossTab in script

Hi All,

Could you please explain and give an example for CROSSTABLE Vs CrossTab in script.

Thanks in advance.

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: CROSSTABLE Vs CrossTab in script

HI,

I never heard the CrossTab may be you are referring the CrossTable(), there is no keyword or function with name CrossTab.

When you want to unpivot the values then you have to use the CrossTable. 

For example

Product, Jan-2015, Feb-2015, Mar-2015, Apr-2015

1,100, 120, 120, 125

2, 120, 90, 110, 115

The above is not suitable for reporting purposes so we need to transform this data to report suitable format, for this we need to use the CrossTable() like below

CrossTable(Month, Sales)

LOAD

*

FROM Sales;

The above script converts the data into below format

Product, Month, Sales

1, Jan-2015, 100

1, Feb-2015, 120

1, Mar-2015, 120

'

'

'

'


Hope this helps you.

Regards,

Jagan.

View solution in original post

8 Replies
MVP
MVP

Re: CROSSTABLE Vs CrossTab in script

What do you mean with 'CrossTab'? Can you tell the context you have found this term?

I assume you think it's kind of a function name or statement?

Arjunarao
Honored Contributor II

Re: CROSSTABLE Vs CrossTab in script

Crosstab load

Highlighted
MVP
MVP

Re: CROSSTABLE Vs CrossTab in script

The LOAD prefix is called CROSSTABLE, not CROSSTAB.

See

The Crosstable Load

Arjunarao
Honored Contributor II

Re: CROSSTABLE Vs CrossTab in script

Thank you swuehl

MVP & Luminary
MVP & Luminary

Re: CROSSTABLE Vs CrossTab in script

HI,

I never heard the CrossTab may be you are referring the CrossTable(), there is no keyword or function with name CrossTab.

When you want to unpivot the values then you have to use the CrossTable. 

For example

Product, Jan-2015, Feb-2015, Mar-2015, Apr-2015

1,100, 120, 120, 125

2, 120, 90, 110, 115

The above is not suitable for reporting purposes so we need to transform this data to report suitable format, for this we need to use the CrossTable() like below

CrossTable(Month, Sales)

LOAD

*

FROM Sales;

The above script converts the data into below format

Product, Month, Sales

1, Jan-2015, 100

1, Feb-2015, 120

1, Mar-2015, 120

'

'

'

'


Hope this helps you.

Regards,

Jagan.

View solution in original post

Arjunarao
Honored Contributor II

Re: CROSSTABLE Vs CrossTab in script

Hi jagan

Thank you for the example.

rjyadav94
New Contributor

Re: CROSSTABLE Vs CrossTab in script

nice explaination thanks.

alis2063
Contributor II

Re: CROSSTABLE Vs CrossTab in script

Cross tab is a company