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

Dimensions with calculation and group

Hi,

Can anyone think of a solution for the scenrio below:

I need the expression [ =sum(aggr(sum(Distinct DOW), WSID)) ] for the dimension CLNO - 17 to indicate 44 and not 0 (zero) ((before actually selecting the dimension CLNO - 17)). You will notice if you do select the item CLNO-17 the correct number (44) appears in the expression column.

(This is only possible to demo in the attached file .... )

I think it's a grouping problem that I can't get around, and I can't think how to do it any other way.

Has anyone got any ideas on how to solve, if possible?  Maybe using a different chart type etc...

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Add a NODISTINCT like in:

= sum(aggr(NODISTINCT sum(Distinct DOW ), WSID  ))

Hope this helps,

Stefan

View solution in original post

3 Replies
swuehl
MVP
MVP

Add a NODISTINCT like in:

= sum(aggr(NODISTINCT sum(Distinct DOW ), WSID  ))

Hope this helps,

Stefan

Not applicable
Author

Unfortunately that didn't work. It nulls the expression column and displays 0 (zero) for both CLNO 14 and 17.

It should show (looking at the inline table in the qvw attached) both 44 in both cases.

It is really strange that it will show 44 in the expression cloumn once the CLNO 17 has been selected.

Something with the grouping is producing strange results. Cheers anyway.

UPDATE: in correct reply the solution does work.

swuehl
MVP
MVP

Hm, it works on my side, please check attached.

Alternatively, you could try using

= sum(aggr( sum(Distinct DOW ), WSID, CLNO))

Stefan