

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Count and distinct with conditions
I have a question. I include an example of what i want. I try to explain it also here. I have a dimension group on my dashboard. In the expression i have a count of debno. But it may only count if the debno is not in another group. The debno's who are in more groups must be named in the group "Multiple".
Is this possible with qlikview ?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think yes.
See attached, or apply the following expression in your "table 2"
sum(aggr(if(count(DISTINCT Group)=1,1,0),Debno))
That expression will per group, count only those DebNo's where they are only in 1 group.
I think, in the same chart you cannot add "multiple" as a line...
A solution can be to place a textbox somewhere, where the "multiple" value is calculated.
This is the expression for the textbox to calculate the "multiple group debo's"
sum(aggr(if(count(DISTINCT Group)>1,1,0),Debno))
See attached QVW where I applied those formula's.
Hope it helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think yes.
See attached, or apply the following expression in your "table 2"
sum(aggr(if(count(DISTINCT Group)=1,1,0),Debno))
That expression will per group, count only those DebNo's where they are only in 1 group.
I think, in the same chart you cannot add "multiple" as a line...
A solution can be to place a textbox somewhere, where the "multiple" value is calculated.
This is the expression for the textbox to calculate the "multiple group debo's"
sum(aggr(if(count(DISTINCT Group)>1,1,0),Debno))
See attached QVW where I applied those formula's.
Hope it helps.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thnx this is what i mean!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're welcome!
Happy Qlikviewing!
