Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Extra data with crosstable

Hi

I have Crosstable() that works fine :

/////////////////////////////////////////////////////////////////////////

DQD :

/////////////////////////////////////////////////////////////////////////

CrossTable( [Flag Name], [Value] ,1)

load

  [Flight ID] ,

  [First Bag Missing Data Flag]   as [First Bag Missing Data] ,

  [Last Bag Missing Data Flag] as [Last Bag Missing Data]

resident  Data.Quality

;

But............. there are some extra dimension fields in the Data.Quality table that I would like included in the DQD table.

Any suggestions how to do it without re-loading the DQD table ?

Best Regards,     Bill

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Extra data with crosstable

Put the extra fields in front of the fields that should be pivoted and increase the last parameter to the number of columns that shouldn't be modified

/////////////////////////////////////////////////////////////////////////

DQD :

/////////////////////////////////////////////////////////////////////////

CrossTable( [Flag Name], [Value] ,4)

load

  ExtraField1, ExtraField2, ExtraField3,

  [Flight ID] ,

  [First Bag Missing Data Flag]  as [First Bag Missing Data] ,

  [Last Bag Missing Data Flag] as [Last Bag Missing Data]

resident  Data.Quality


talk is cheap, supply exceeds demand
3 Replies
fred_s
Contributor III

Re: Extra data with crosstable

Hi Bill,

What's wrong with reloading Data.Quality?
You're already loading from resident.

/////////////////////////////////////////////////////////////////////////
DQD :
/////////////////////////////////////////////////////////////////////////
CrossTable( [Flag Name], [Value] ,1)
load
  [Flight ID] ,
  [First Bag Missing Data Flag]   as [First Bag Missing Data] ,
  [Last Bag Missing Data Flag] as [Last Bag Missing Data]
resident  Data.Quality
;


left join
Load [Flight ID],
  ExtraDim1,
  ExtraDim2
resident  Data.Quality
;

MVP & Luminary
MVP & Luminary

Re: Extra data with crosstable

Put the extra fields in front of the fields that should be pivoted and increase the last parameter to the number of columns that shouldn't be modified

/////////////////////////////////////////////////////////////////////////

DQD :

/////////////////////////////////////////////////////////////////////////

CrossTable( [Flag Name], [Value] ,4)

load

  ExtraField1, ExtraField2, ExtraField3,

  [Flight ID] ,

  [First Bag Missing Data Flag]  as [First Bag Missing Data] ,

  [Last Bag Missing Data Flag] as [Last Bag Missing Data]

resident  Data.Quality


talk is cheap, supply exceeds demand

Re: Extra data with crosstable

G

Brilliant - works perfectly.

I was wondering earlier what that third numeric parameter did, thanks to you I now know.

Many Thanks,     Bill