Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
eugene84
Partner - Contributor
Partner - Contributor

How to count how many times a number appears in the whole model in a table

Hello, I have this dataset where I want to calculate the last two columns.
But I need that the values keep the same when I select in Qlik a Customer.
 - Times From number appears: Show how many times the from number is in the whole dataset.
 - How many distinct clients From number is: How many distinct customers have the From number in the whole model.

eugene84_0-1708003585228.png

What I tried so far is the following formulas:
Times From number appear:

 

Count({<Customer>}Total <[From Number]> [From Number])

 

How many distinct From number appears:

 

Count({<Customer>}Total <[From Number]> distinct Customer)

 

 

So far, these codes work as they give me the correct data, but when I want to filter a Customer in the table, and because of the set analysys the whole data shows and is not filtered.

How can i get this to work so when I filter a customer the values remain the same and in the table i can only see the customer I filtered?

Thanks.

I attach excel and qvf

 

Labels (1)
1 Reply
eugene84
Partner - Contributor
Partner - Contributor
Author

I solved it by creating an aggregated table in script that links with the fact table by the field from number aggregating the amount of calls and customers.
Still would be nice to know if it is possible o do it by set analysis