Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
phil-ebm
Contributor

Different Result for same expression in TextObject and Chart

Hallo Community

I have a problem and at the moment no more ideas how I can solve it or where/what the real problem is.

I use following expression in a text object and in a straight table:

=Count({<$(=vSetAnalysisPosTyp1)>} HU)

text object -> this is the right result

TextObject.png

straight table

StraightTable.png

But at the end i have for the same selection two different results

result.png

I hope someone can help me.

Why I get different results for the same expression? How I can find the right result in the straight table.

Regards

Philipp

15 Replies

Re: Different Result for same expression in TextObject and Chart

HI

Could you please post a sample file to verify the expression.

MVP & Luminary
MVP & Luminary

Re: Different Result for same expression in TextObject and Chart

The reason will be that your expression within the table will be consider their dimension while within the textbox it will be calculated globally. In your case I assume that you used dimensions which are from more then one table and which are not be associated in the right way so that the table-dimensions are blown up.

- Marcus

phil-ebm
Contributor

Re: Different Result for same expression in TextObject and Chart

Here the example

Re: Different Result for same expression in TextObject and Chart

Hi

In text box, your expression is

=Count({<$(=vSetAnalysisPosTyp1)>} distinct HU)

And your chart expression is

=Count({<$(=vSetAnalysisPosTyp1)>}  HU).

So please change the chart expression  to

=Count({<$(=vSetAnalysisPosTyp1)>} distinct HU)

Geschäftsjahr Monat Gesamt HU
32636
2016Jun32636

Re: Different Result for same expression in TextObject and Chart

Hi,

You are missing Distinct Keyword in chart expression.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
phil-ebm
Contributor

Re: Different Result for same expression in TextObject and Chart

sorry in the example i added the wrong text object.

in this new file is the text object without distinct and less hus then in the straight table

Re: Different Result for same expression in TextObject and Chart

Hi

Instead of HU , try like below in chart

=Count({<$(=vSetAnalysisPosTyp1)>}  [HU Pos])

Chart is calculates based on dimension like Year and Month. So there is duplication will occur.

Text box is calculate overall (without any dimension)

Not applicable

Re: Different Result for same expression in TextObject and Chart

Your expression is different in the chart and the text object,

In the expression in your chart,

add distinct to your expression,

i.e. =Count({<$(=vSetAnalysisPosTyp1)>} distinct HU)

Regards,

Anjali Gupta

phil-ebm
Contributor

Re: Different Result for same expression in TextObject and Chart

but i need the HU-Field not the HU Pos Field