Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
trdandamudi
Master II
Master II

Getting different result for the same set analysis expression

I have a set analysis expression that I am using in pivot table and they are as below:

Dimensions:

ID

UsedDate

Time

Expressions:

=Sum(For_mms) / count({<Source={'XYZ'}>} DISTINCT [UsedDate])  <-------------------- I am getting 43 in the pivot

Text Box:

=Sum(For_mms) / count({<Source={'XYZ'}>} DISTINCT [UsedDate])   <-------------------- I am getting 48 in the text box

When I am using the same set analysis expression in the pivot and text box I get different results ? What am I missing here ?

Thanks

16 Replies
ecolomer
Master II
Master II

Probably For_mms have more values possible in text box because aren't any dimension

trdandamudi
Master II
Master II
Author

Thanks for the quick reply... How can I get the text box result into the pivot ? Should I need to re-write the expression in Pivot ?

Thanks

ecolomer
Master II
Master II

Try put only Sum(For_mms) in a text box and in a Pivot tabla and see it

trdandamudi
Master II
Master II
Author

I am getting same result  40470.

Also tried the below expression in the pivot:

Sum(For_mms) / count(Total{<Source={'XYZ'}>} DISTINCT [UsedDate])  and I am getting correct results. I am getting the correct results when I select a individual id in the filter. If I clear the filter I am getting the wrong result ?


ecolomer
Master II
Master II

You can upload qv file?

trdandamudi
Master II
Master II
Author

I do not have access to do that. Do you want any screen shots ?

Thanks

trdandamudi
Master II
Master II
Author

I am able to put a sample dashboard so that you can take a look. I am also attaching a screen shot where I circled on three places.

The text box shows as 48 days. The Table - I shows 43 days for the same set analysis expression. By looking at the " Table - I " I am able to find out that the  reason it is showing only 43 days instead of 48 days because there are 5 records in column (5 am) which are either null or zeros. Regardless of the the time I need to get 48 days because there are 48 records in the column "UsedeDate" with valid dates.

If you need any info please let me know. Thank you for your time.

avinashelite

Try this expression in the text box

Agg(Sum(For_mms) / count({<Source={'XYZ'}>} DISTINCT [UsedDate]),ID,UsedDate,Time)

Kushal_Chawda

try this

sum(Agg((Sum(For_mms) / count({<Source={'XYZ'}>} DISTINCT [UsedDate])),ID,UsedDate,Time))