Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
antupe
Contributor III
Contributor III

Chart representation

Hello!

I import data in te following form:

Apartment ID AIR CONDITIONING HEATING BALCONY PARKING
255 YES NO NO NO
301 NO YES NO YES
075 NO NO NO NO
111 YES YES NO NO
023 YES YES YES YES

 

I would like to create a chart/table as the following:

  YES NO
AIR CONDITIONING =count({<AirCond={YES}>},AirCond)=3 =count({<AirCond={NO}>},AirCond)=2
HEATING =count({<Heating={YES}>},Heating)=3 =count({<Heating={NO}>},Heating)=2
BALCONY =count({<Balcony={YES}>},Balcony)=1 =count({<Balcony={NO}>},Balcony)=4
PARKING =count({<Parking={YES}>},Parking)=2 =count({<Parking={NO}>},Parking)=3

 

Any idea of how I could do this?

Labels (1)
  • Other

1 Reply
ZouhairLahlou
Contributor II
Contributor II

Hello, 

You can transpose the columns to rows by using a cross table . 

TEST : 
load * inline
[Apartment ID,AIR CONDITIONING,HEATING,BALCONY,PARKING
255,YES,NO,NO,NO
301,NO,YES,NO,YES
075,NO,NO,NO,NO
111,YES,YES,NO,NO
023,YES,YES,YES,YES];


Cross:
CrossTable([Facilities], [YESorNo?]) load [Apartment ID], [AIR CONDITIONING],[HEATING],[BALCONY],[PARKING] Resident TEST;

DROP TABLE TEST;
EXIT SCRIPT;

 

To create the table you want, you should use Facilities and YESorNO? as Dimensions then simply count the YESorNo? in the expressions section. 

 

ZouhairLahlou_0-1652973534309.pngZouhairLahlou_1-1652973551246.png