Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Different results in a chart and in a textbox

Hello everyone,

I am facing a very weird thing. I have a chart (a table) like this:

Dim1      $(var1)

A             71

I have several "Dim1" but I have filtered on A so only one line appears. The expression is stored in a variable $(var1). var1 is a count of customers numbers with on condition in a set analysis.

If I remove the dimension Dim1 from the chart, then 71 goes to 69.  (Whereas there is a filter on Dim1 to keep only 'A')

What explains that ?

Please, let me know if I need to add details..

Thank you for your help

Laura

6 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Your chart-expression will be calculated against a dimension even if there is only one dimension-value. The textbox-expression will be calculated without a dimension global against the whole data-set and this could be different.

- Marcus

Highlighted
Not applicable

Thank you Marcus for your reply.

But as I said, I have filtered on the dimension (in the document) so to have it or not in the chart shoudln't make a difference, right ?

Highlighted
Not applicable

Moreover, when I remove the dimension in the chart, I get a smaller figure.

Highlighted
MVP & Luminary
MVP & Luminary

Please post your expression. Further you could have differences if you calculates over key-fields.

Highlighted
Not applicable

The expression is :

Count( {$< [Product closed]={0}>} if (Isnull (accountNumber), CustomerNumber, accountNumber))

I want to count the number of "accountNumber" that has a product which hasn't been cancelled.

The dimension is Product.

I have filtered on product A and according on if I put the dimension product or not in the chart, the figure changes..

Thank you for you help

Highlighted
MVP & Luminary
MVP & Luminary

Isnull() didn't worked often like expected, try instead:

if(len(trim(accountNumber)) >= 1, CustomerNumber, accountNumber)

and this are none key-fields? If yes, double the field within the script and use this double for the calculation.

- Marcus