Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add multiple variables to an expression?

Hi,

I am trying to create a chart that shows the count of "Yes" and "No" from our data.  I have two column legal validated (Yes/No) and Comp Validated (Yes/No).  How can I get the count of No/No, Yes/No, No/Yes, all under the same count as 'No'? And then show a count of all the 'Yes/Yes"?   

I was able to get a count of the Yes and No using this equation;

 

Dual(CompValidation&' - '&Count(DISTINCT([Topic),Count(DISTINCT(Topic)))

Thank you,

Nicholas

1 Solution

Accepted Solutions
Not applicable
Author

Haagenfels,

What I can speculate right now reading your requirement it seems you are  facing problems with pie-charts.

I have attached a image on properties of  Pie Charts

consisting of Dimension Limits Tab.

What I can suggest over here is that you need ti bit play around with the "limits" options

of the "Dimensions Limits" .

If you can send me a screen shot of the Dimension Limits of your chart i might be able to suggest you better.

Satyajeet

View solution in original post

15 Replies
Not applicable
Author

Hi,

     Try this set analisys expresion

Count({$<Legal= {"Yes"},Comp= {"Yes"}>}Dimension)

Count({$<Legal= {"Yes"},Comp= {"No"}>}Dimension)

Count({$<Legal= {"No"},Comp= {"Yes"}>}Dimension)

Count({$<Legal= {"No"},Comp= {"No"}>}Dimension)

I hope to help you

Not applicable
Author

I do not think i have the right dimention.  What would I use?   I am ok with having 2 pie charts, one that shows everything for Legal the other that shows everything with CompValidated.  Thank you.

Not applicable
Author

on the above set analysis expressions provided by Gregorio instead of "Dimension" you need to write "TOTAL(Dimension)"

It will solve the problem

attached application for your reference to count the number of No and Yes

Not applicable
Author

I got the graph going. Thank you.

In the Dimensions field I am putting in the topic associated with all these values.  Is there a way to add a DISTINCT to it.  When I added DISTINCT it did not seem to work.  The Topic Area is a field classified by a drop down associated to each CompValidated and LegalValidated.

Ex:

Topic                                                                                                                        Legal          Company

Agricultural CommYESNO
Agricultural SwapYESYES
#Confirmation, Portfolio Reconciliation, YESNO
#Confirmation, Portfolio Reconciliation, YESNO
#Confirmation, Portfolio Reconciliation, YESNO

=count({<CompValidation={'NO'},LegalValidation={'NO'}>} total(DISTINCT([TopicArea])))

Thank you for the first part.

 

Not applicable
Author

In this case write the expression like this

=count({<CompValidation={'NO'},LegalValidation={'NO'}>} [TopicArea])

This way you will be able to count as per the field "TopicArea"

Not applicable
Author

I have attached a pivot table for understanding the expressions

Not applicable
Author

That worked thank you.  Is there a special technique to add labels next to the numbers that are shown on the pie charts? For instance I have 4 pieces and would like to see their corresponding numbers with labels on them?

Thank you for yoru help.

Not applicable
Author

I was just now checking with the Pie Chart options.

I am not sure but

I guess you need to select the "Pop up Labels" option in the Presentation tab for the Properties of the Chart.

Now when you move your cursor/pointer over the given section of Pie-Chart it will then display
the "Expression Value" and the "Topic" associated with that expression.

Attached QVW file for Reference

Not applicable
Author

Thank you.  That will work.

They asked if I would be able to combine the 3 expressions like you did to equal 'no.' Can I just add it to the end or does it need to be recalculated?  Basically looking for two answers in the chart. Yes and No.

Thanks