Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

CrossTable returning too few rows

Hi - i'm using a crosstable as below.

The first query returns the right amount of rows (rows * columns)

The second query returns less than what i expect, when i round my volumes - the end result looks fine, I'm curious what QV is doing to not return as many rows as I'd expect.

Thanks,

Nandy.

Query 1

CrossTable(WEEK, VOLUME, 6)

LOAD CHANNEL,

     PROPOSITION,

     ITEM,

       [1],

       [2],

        [3],

       [4]

from tab;

Query 2

CrossTable(WEEK, VOLUME, 6)

LOAD CHANNEL,

     PROPOSITION,

     ITEM,

round ([1],0.001) as 1,

round ([2],0.001) as 2,

round ([3],0.001) as 3,

round ([4],0.001) as 4

from tab;

6 Replies
Not applicable

Not sure why but I do know that Weeks field needs to be converted into numerical values first. Crosstables do something that leaves them in a String state.  Use an expression like this to convert them;

You can insert the Round outside of num# which converts into a numerical value.

Date(Num#(Weeks),'DD-MMM-YY') as Weeks

I'm sure someone has a better explanation but I know this works for me. I struggled with this issue as well.

Creator III
Creator III

Hi Nandy,

Is this a two different tables with similar columns?

Regards,

Tom

Contributor III
Contributor III

Hi Tom, no, its the same table.

Nandy

Creator III
Creator III

ok, Create a table for crosstab,and then using resident put the condition (in this case round).

Regards,

Tom

Contributor III
Contributor III

Hi  - this works, both methods end with the same final number of rows, so at least I can be confident the end result is correct.

Still it would be interesting to understand what QV is doing to give the difference.

Thanks

Nandy

Not applicable

Hi Nandy,

Will you be able share the data file and the qlikview for a better analysis?

--

Vinoth