Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Possibly Transpose Pivot Table?

Hey guys,

I currently have a pivot table that counts the number of null fields with the expression:

     count( if ( isNull(field1) or isNull(field2) or isNull(field3), field_to_be_counted)

this basically results in a table like   

field1field2field3Null Count
datadatadata0
dataNulldata1
dataNullNull2
datadatadata0
Nulldatadata1

I'd like to get it to this arrangement (basically transpose the column names to the left side and hide the data and have the null count be down the column rather than across the row):

ColumnNull Count
field11
field22
field31

Would this be possible?

Any help would be appreciated, thanks!

4 Replies
kiranmanoharrode
Creator III
Creator III

Load Data and take resident of above table and

Try Below Script:

Fabs(IsNull(Field1))+Fabs(IsNull(Field2))+Fabs(IsNull(Field3)) as TotalNullCount

this will generate your total Null count

regards

Kiran Rode

+91 8976977897

Not applicable
Author

Thanks for the response Kiran!

I tried the code but I couldn't seem to find the TotalNullCount field. Could it possibly be because I loaded the data through a SQL query?

gopalopsharma
Creator
Creator

Actually in my understanding there is no way to show a table in the format you wish. because charts/ pivot works on field values not the field names itself.

one work around.

while loading the data create three new fields like this

nullcount(Field1) as NullField1

nullcount(Field2) as NullField2

nullcount(Field3) as NullField3

Then create a straight table with no dimension but put each of above as three different expression and name the column names as desired.

Hope this helps.

preminqlik
Specialist II
Specialist II

hi , find attachment ..hope this helps you