Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
phil-ebm
Creator
Creator

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
MayilVahanan

HI

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

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
marcus_sommer

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
Creator
Creator
Author

Here the example

MayilVahanan

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
Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
PrashantSangle

Hi,

You are missing Distinct Keyword in chart expression.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
phil-ebm
Creator
Creator
Author

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

MayilVahanan

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)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable

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
Creator
Creator
Author

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