Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Part of expression which ignores dimension

How can get one part of an expression (bold and underlined) to ignore a dimension on a bar chart (in this case CalendarDate), but NOT the other part?

COUNT(DISTINCT UserName)  /  COUNT(DISTINCT UserName)

1 Solution

Accepted Solutions

Re: Part of expression which ignores dimension

COUNT({$<CalendarDayName-={'Sat','Sun'},UserName-={"*test*"}>} DISTINCT UserName)

/

COUNT(TOTAL {$<CalendarDayName-={'Sat','Sun'},UserName-={"*test*"},SessionStartedDate = >} DISTINCT UserName)

5 Replies

Re: Part of expression which ignores dimension

COUNT(DISTINCT UserName)  /  COUNT( {<Dimension1Name = , Dimension2Name = >}DISTINCT UserName)

Not applicable

Re: Part of expression which ignores dimension

And if I only had one dimension it would be as follows?

COUNT(DISTINCT UserName)  /  COUNT( {<Dimension1Name = >}DISTINCT UserName)

MVP
MVP

Re: Part of expression which ignores dimension

you can find the answer above,

or in online help

     sum( {$<Region = >} Sales )
     returns the sales for the current selection, but with the selection in “Region” removed.

or in the doc of Aunez Fabrice (if you have time)

Set Analysis: syntaxes, examples

Not applicable

Re: Part of expression which ignores dimension

My full expression is actually;

COUNT({$<CalendarDayName-={'Sat','Sun'},UserName-={"*test*"}>} DISTINCT UserName)

/

COUNT({$<CalendarDayName-={'Sat','Sun'},UserName-={"*test*"},SessionStartedDate = >} DISTINCT UserName)

The only dimension is SessionStartedDate

But it doesn't seem to work. It just comes out as 100%, which means it isn't ignoring the dimension

Re: Part of expression which ignores dimension

COUNT({$<CalendarDayName-={'Sat','Sun'},UserName-={"*test*"}>} DISTINCT UserName)

/

COUNT(TOTAL {$<CalendarDayName-={'Sat','Sun'},UserName-={"*test*"},SessionStartedDate = >} DISTINCT UserName)

Community Browser