Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
prma7799
Master III
Master III

count will increase when we use Hierarchy

Hi All ,

I am using below  code for  HIERARCHY but my GeoCount  will increase

HIERARCHY(CHILD_ID, PARENT_ID, [HQ], [Parent Name], [HQ], [Path Name], '/')

LOAD Hqid AS [HQ Code],

    Hqname AS [HQ],

    GeoLevelName AS [Level Name],

    CHILD_ID,

    PARENT_ID,

    Sgid as  GeoDivision,

    GLevelIndi,

    GeoCount ,

    Rmcount

FROM

[HQMaster.qvd]

(qvd);

Actual count is 477 for GLevelIndi 5 and  GeoDivision 2 but it is showing 41953.

2 Replies
tresesco
MVP
MVP

May be because of the following reason:

Usually the input table has exactly one record per node and in such a case the output table will contain the same number of records. However, sometimes there are nodes with multiple parents, i.e. one node is represented by several records in the input table. If so, the output table may have more records than the input table.

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/ScriptPrefixes/Hierarc...

prma7799
Master III
Master III
Author

Thanks for your reply ...

Could you please explain how to achieve this I mean I dont want  to disturb  Hierarchy but also want exact geocount i.e 477