Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple dimension values in two cell. How to count properly?

Hi there,

I have a dataset like the table below (larger though):

IDAppBusiness functionName
231BroadDisplayKok; Bok; TokPuk; Put
245SmallDisplayStone; Bone; HomeStuck; Cut; Duck

Now I made subfields for 'Business function' and 'Name' like this:

                    SubField("Business function", ';') as Tags,

                    SubField("Name", ';') as Tags2,

The following problem now occurs when I want to count the Business function or Name:

IDAppTags (Business function)Tags2 (Name)
231BroadDisplayKokPuk
231BroadDisplayBokPuk
231BroadDisplayTokPuk
231BroadDisplayKokPut
231BroadDisplayBokPut
231BroadDisplayTokPut
245SmallDisplayStoneStuck
245SmallDisplayBoneStuck
245SmallDisplayHomeStuck
245SmallDisplayStoneCut
245SmallDisplayBoneCut
245SmallDisplayHomeCut
245SmallDisplayStoneDuck
245SmallDisplayBoneDuck
245SmallDisplayHome

Duck

This would mean that even with the set analysis below my business function Tok, Kok, Bok is still counted twice. And Stone, Bone, Home is counted tree times if I am correct:

count(aggr(sum(DISTINCT [Tags]), [ID]))

OR

count(aggr(sum(DISTINCT [Tags]), [Tags2]))

I somehow want to combine the DISTINCT ID and Tags2 but I don't know if that is possible. Does anyone have a clue what I am talking about and would show me the solution (A)?

Would be great help if anyone knows how!!!

Tnx

3 Replies
Not applicable
Author

can you please send the screenshot of what you want the end result look like?

sunny_talwar

May be this:

Sum(Aggr(Count(DISTINCT Tags), Tags2, ID))

Not applicable
Author

First of all tnx for the quick replies . I want the following but I just want this to happen in the set analysis:

  • count(aggr(sum(DISTINCT [Tags]), [ID]))

   

IDAppTags (Business function)Tags2 (Name)
231BroadDisplayKokPuk; Put
231BroadDisplayBokPuk; Put
231BroadDisplayTokPuk; Put
245SmallDisplayStoneStuck; Cut; Duck
245SmallDisplayBoneStuck; Cut; Duck
245SmallDisplayHomeStuck; Cut; Duck

Sunny T I will try yours in a sec, it might be the one I am looking for.