Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sharu055
Contributor III
Contributor III

Filters not working when i use 1 or Total in my Qlikview stright table set expression

Hi,

I using stright table in qlikview with two dimension and 5 expression. In one expression i need to count all the user ID. I use Count({1} Distinct(User ID)). Its works perfectly for all the dimension. But if i apply filter for perticular dimension the stright table wont filter, insted of that it will show 0 values for other records and show exact records for filter value. But All the records irrespective of selection is present in the stright table. I need tatal count of selected values in stright table only for current selection.

Please help me in resolving

Labels (2)
1 Solution

Accepted Solutions
Digvijay_Singh

I don't see other dimension values than L1='A', I mean I don't see L1='B' in the bottom table

Digvijay_Singh_0-1647885235979.png

 

View solution in original post

16 Replies
anthonyj
Creator III
Creator III

Hi @sharu055 ,

The {1} in Qlik is used to prevent any interaction of the measure with the filters so if you want the measure to update when selecting a value in a dimension you need to remove this part.

Count(Distinct(User ID))

Regards

Anthony

Digvijay_Singh

Are you saying filters are not working even with 'Total'?

Count(Total distinct [User ID])

sharu055
Contributor III
Contributor III
Author

I need to count all the Distinct User ID in my first expression column and in second expression i am using the Distinct User ID.. I am comparing Total User ID with Login User ID. So i need first expresion all the Distinct user ID. Please help

sharu055
Contributor III
Contributor III
Author

Hi,

Yes, filter not working for this as well  actually I need to count all the Distinct User ID in my first expression column and in second expression i am using the Distinct User ID.. I am comparing Total User ID with Login User ID. So i need first expresion all the Distinct user ID. Please help

Digvijay_Singh

If possible pl share a sample app to look further and understand the real problem.

sharu055
Contributor III
Contributor III
Author

Hi,
Below my input columns and requird output
Inout table:
L1   L2   User_ID   Month     Year
A     AA    A1              Jan          2022
A     AB   A2               Jan          2022
A     AC   A3
A     AA    A11
A     AB   A21              Jan          2022
A     AC   A31              Jan          2022
A     AA    A4                Jan          2022
A     AB    A5
A     AC    A6                  Feb         2022
B     BA    B1                 Jan          2022
B     BB   B2
B     BC    B3                 Jan           2022

My output should be in stright table, If i apply filter
L1 = A, Month = Jan and Year =2022 it should display as below L1, L2 are my dimensions and Expression are Total_Distinct_Count must be total distinct count of User_ID to respective L1 and L2 and Distinct_Count_month_Jan should not show count of Distinct User_ID according to month and year filter. If i apply filter L1=A, the output table should not show L1=B values in it.
Output table:
L1   L2     Total_Dist_Count   Dist_count_month_Jan

                              9                             5
A      AA                3                             2
A      AB                3                             2
A      AC                3                             1

Digvijay_Singh

According to your selections mentioned in the last post, I don't know why you are expecting 3 in first measure, shouldn't it be 5?

Digvijay_Singh_1-1647730118840.png

 

Digvijay_Singh_0-1647730052967.png

If you can explain why do you expect '3' in the first measure column, I think I will understand your exact need.

Digvijay_Singh

Your first column is achieved when we disregard selection of month and year, not sure if you are trying to see the total for L1='A' irrespective of selections in Month and Year - 

Digvijay_Singh_3-1647730646225.png

 

sharu055
Contributor III
Contributor III
Author

Hi Digvijay,

Sorry, actually its should be 5. By mistake i put 3.