Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sujeetsingh
Master III
Master III

Expression not giving correct value but Table giving true no. of rows

Hi every body,

I really admire all the replies from all of you and this proves the helping nature of you alll.

Today i am having a issue:

-I am using a expression Sum(fields) where fields have only value 1 or zero.

-now i am having a data table where i am having all the fields along with this field when i select fielter of this field with value '1'

then the total no rows in data tab straight table are correct as per database,

BUT MY EXPRESSION IS SHOWING MARE VALUE

Note-this fieldis from a table and the table is joined to a demographics table for other fields.

PLZ try....

-

8 Replies
Anonymous
Not applicable

can u plz share d app?

sujeetsingh
Master III
Master III
Author

Thanks for you reply Vaibhav.But sorry i cant send the App.

Anonymous
Not applicable

So.. let me understand your issue.

You have a straight table where there are some dimensions and the expression is SUM(Fields)...

Consider this example.. .

Table1:

Column1     Column2     Column3     Expression

a                    b               c               1

d                    b               n               1

u                    y               t                0

and when you select a filter for value 'b' in Column2 you want the expression result as 1 repeating twice...

is that what you are asking..

sujeetsingh
Master III
Master III
Author

Hi Adil quite goood grasping ..but alittle bit reflected..I will explain you:-

Table1:

Column1     Column2     Column3     Expression

a                    b               1              1

d                    b               0               1

u                    y               1               0

I had editted you Coulmn3

-my expression is-sum(column3)

-Filter is there as Column3

-now when i am selecting 1 in filter the table is giving two rows ...which is correct

-whil my expression in chart is giving wrong value as 4 0r 3...means more than correct

Anonymous
Not applicable

hi sujeet

                 let me undrstnd....

                 i  took d same column 1, 2  and 3

            now wen i take dimension- col1

                                                      - col2

                                     expression sum(Col3)

gives me d result

2 as total

sujeetsingh
Master III
Master III
Author

Hi..Vaibhav..Good attempt,but budy it is not so easy.

By joining two tables i had taken one table and then taking the field..but i am not getting correct answer...that you tried is just taken for explaining.

Anonymous
Not applicable

ok.... 😞 

                    Sample app  wud have been better to wrk on....

sujeetsingh
Master III
Master III
Author

given sample file in a new thread please have a loook