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

Change shape of indicators

Hi everyone

I have some data that is structured in a way that spreads indicators out over a number of fields. But I want to change the shape of that to bring that all into one field.

Please see attached sample data and target output.

Any advice much appreciated.

Thanks !

Stuart

3 Replies
hector_munoz
Specialist
Specialist

Hi Stuart,

Look at crosstable functionality:

CROSSTABLE (Color,Number_Of_Items, 0)
LOAD *

FROM EXCEL_FILE;

Regards,

H

vishsaggi
Champion III
Champion III

Try this:

Table1:

CrossTable(Color, Data)

LOAD Count,

     Purple,

     Green,

     Yellow,

     Red,

     Blue

FROM

[..\YourexcelPath\Transform.xlsx]

(ooxml, embedded labels, table is Sheet1, filters(

Transpose(),

Rotate(right)

));

Use Straight table and add

Dim: Color

Expr: = Sum({<Data = {'1.000000'}>}Count)

Capture.PNG

el_aprendiz111
Specialist
Specialist

Hi,

TABLE:
CrossTable(Color, Value)
LOAD num(Count) as Count,
Purple,
Green,
Yellow,
Red,
Blue
FROM
Transform.xlsx
(
ooxml, embedded labels, table is Sheet1, filters(Transpose(),Rotate(right)));

NoConcatenate
sumary:
LOAD Color, NUM(Value) AS Value, Count Resident TABLE Where NUM(Value)>=1;

DROP Table TABLE;

colors.png