Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Blank Rows Comes when using Hierarchy Fuction

Hi All ,

I am using just a simple script to load the hierarchy , but i am geting 1 bank roe at each level . please tell why ?

A:

Hierarchy(X,Parent,Des)

LOAD Des,

     ID   AS X,

     Parent

FROM

(ooxml, embedded labels, table is Sheet1);

Hierarchy_New.jpg

2 Replies
swuehl
MVP
MVP

Well, I think that's how the hierarchy works.

If you look at the created table in table view, there is one line per original input line. There is one line which only contains the root node, and several line containing only the root and the secod level nodes.

Potentially, you can have attributes assigned directly to root node or second level nodes.

When you for example aggregate the attributes in your table, you will see that there might be the need for NULLs in the lower level of the hierarchy.

If only the lowest level of your hierarchy is related to attributes, the empty lines will disappear by itself (given 'suppress zero values' is enabled in presentation tab) when you aggregated thes attributes in an expression.

In your specific table sample, if you don't like the empty lines, enable 'Suppress when Value is Null' on dimension tab for all dimensions.

Yossarian
Contributor
Contributor

'Suppress when Value is Null' removes records from the Hierarchy.