Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Showing different totals in either text box or chart

I have the following selection boxes:

1  Client or Non Client

2.  Listing of States

3.  Listing of Markets

    

My Desirable Results:

1.  A chart or text box that shows, as example, 400 Clients when someone selects client.

2.  A chart or text box that shows, as example, 300 Clients when someone selects lets say TX but does not change the chart or box for client at 400.

3.  A chart or text box that shows, as example, 200 Clients when someone selects lets say Public K12, which is one of our markets, but does not change the chart or text box for client or for state.

Does this make sense and can it be done?

David

1 Solution

Accepted Solutions
sujeetsingh
Honored Contributor III

Re: Showing different totals in either text box or chart

David what ever as till i get from your explanation i build a sample for you may it will help you .

11 Replies
sujeetsingh
Honored Contributor III

Re: Showing different totals in either text box or chart

It is quite confusing can you post a sample if possible.

Not applicable

Re: Showing different totals in either text box or chart

I dont have a way to show a sample but let me see if I can demonstrate it better:

Total Number of Clients = 500

Total Number of Clients in TX = 400

Total Number of Clients in TX that are Public K-12 = 300

I want to show all of these stats at the same time.  What is currently happening is:

Step 1: A person selects the Type in the case Client

The results are:

Total Number of Clients = 500

Total Number of Clients in TX = 0

Total Number of Clients in TX that are Public K-12 = 0

Step 2:  A person selects State in this case TX:

The results are:

Total Number of Clients = 400

Total Number of Clients in TX = 400

Total Number of Clients in TX that are Public K-12 = 0

Instead of:

Total Number of Clients = 500

Total Number of Clients in TX = 400

Total Number of Clients in TX that are Public K-12 = 0

Step 3:  A person select Industry in this case Public K-12

The results are:

Total Number of Clients = 300

Total Number of Clients in TX = 300

Total Number of Clients in TX that are Public K-12 = 300

Instead of:

Total Number of Clients = 500

Total Number of Clients in TX = 400

Total Number of Clients in TX that are Public K-12 = 300

I know that the issue is the selection boxes but hoping to get around it;

David

sujeetsingh
Honored Contributor III

Re: Showing different totals in either text box or chart

David what i will recommend is the data model association.

If the fields are well associated then there will be a uniform and accurate  selection results.

sujeetsingh
Honored Contributor III

Re: Showing different totals in either text box or chart

David what ever as till i get from your explanation i build a sample for you may it will help you .

Not applicable

Re: Showing different totals in either text box or chart

Hi David,

You can use expressions for the text boxes where you are showing the stats, might be something like:

For Total:
=Count([Clients]) (Assuming Clients is the field name)

For TX:

=if(State = 'TX', count([Clients]))

For Public K-12:

=if(Industry = [Public K-12], count([Clients]))

Provided all your fields are either coming from the same table or joined appropriately.

I have used Clients, State, Industry as field names, you can replace them with actual field names.

Hope this helps!

Not applicable

Re: Showing different totals in either text box or chart

I understand the formulas. The problem I have is type(client), state, and industry are in separate selection boxes on my dashboard. When I click on client I get the right number but when I click on state it changes the client number.  i want to show total clients and total clients in the state.  Separate counts that is.  Does this make since? 

David

Not applicable

Re: Showing different totals in either text box or chart

Hi there....

I am sorry for the confusion.  I have been using QlikView for a little over a year now and at times I dont explain things well.  Your example is what I want to have but let me share my dashboard:

I have locked the Type Selection box with a Trigger to set it to Client.  Then my Sales and Marketing Team will be able to pick from any state(s) or industry(s).  Then after making those selections I want the results like you have in your qvw:

Total Clients                                    

       

Total Number of Clients in "State Picked"

Total Number of Clients in "State and Industry Picked"

The problem I am having is I can select the client and get 5 but when I select the state my client number changes to 4 and the Clients in State Picked is 4.  I dont want the total client number to change.  Does this make sense and help explain my issue?

David

Re: Showing different totals in either text box or chart

Use a set expression in your total clients to ignore selections.

=Count({1}DISTINCT ClientID)

-Rob

Not applicable

Re: Showing different totals in either text box or chart

I dont want to ignore selections and that is the problem.  I want to show on the dashboard I have:

300 Clients in the State of Selection

Out of that 300 I have 250 Pubic K-12.

Both of those numbers are important and I want to show both of them at the same time.  So I need two expressions, one for each of the items above.

David

Community Browser