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

Urgent Help

i want to load data for Domain ,SubDomain,Visit

1.for Domain i want to load only those rows which is not eqal to total .

2.for SubDomain i want to load rows which is not equal to total but if count of Domain is equal to 1 then i also need to load total for that row .

is there any way to do this.

Sample data:

DomainSubDomainVisit
abcabc110
abcabc110
abcabc110
abcabc110
abctotal50
xyztotal20
ghjghj130
ghjghj130
ghjghj130
ghjghj130
ghjtotal120
jkltotal80
totaltotal430

Load table should be like as:

DomainSubDomainVisit
abcabc110
abcabc110
abcabc110
abcabc110



xyztotal20
ghjghj130
ghjghj130
ghjghj130
ghjghj130



jkltotal80
1 Reply
MayilVahanan

Hi,

     Try like this,

Testing:
Load *  Inline
[
Domain,SubDomain,Visit,
abc,abc1,10
abc,abc1,10
abc,abc1,10
abc,abc1,10
abc,total,50
xyz,total,20
ghj,ghj1,30
ghj,ghj1,30
ghj,ghj1,30
ghj,ghj1,30
ghj,total,120
jkl,total,80
total,total,430
] where Domain <> 'total';

Load if(Previous(Domain) = Domain and SubDomain = 'total','',SubDomain) as SDomain,if(Previous(Domain) = Domain and SubDomain = 'total','',Domain) as Domain1,
if(Previous(Domain) = Domain and SubDomain = 'total','',Visit) as Visit1 Resident Testing;

Drop Table Testing;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.