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

Writing percent expression

I'm trying to figure out how to write an expression to show percentage. In my data, I have a field called Discharged Date which gives the date that people have been discharged. I have another field called Discharged Reason that contains a list of reasons why people get discharged. I can create a graph that gives me the count of each discharge reason

Count(if([Discharged Date]=Date,_ConsumerProfileKey)) with my dimension being Discharged Reason.

How do I create a graph that show me these numbers as a percent? I.e. I want to show a graph that shows me what the reason was for dischage by perfect for 2011,or 2012, etc.

Any ideas?

1 Solution

Accepted Solutions
Not applicable
Author

Nvm - I figured it out.

Thanks anyway

View solution in original post

6 Replies
Gysbert_Wassenaar

Change the Number Format Settings for the expression on the Number tab of the properties screen of your chart. Select Number (or Fixed to) and select Show in Percent (%).


talk is cheap, supply exceeds demand
Not applicable
Author

That won't work. If I have a count of 2 for a discharge reason, it will just become 200%. I need to find a way to write an expression where I divide each individual discharge reason by the total number of discharge reasons

Not applicable
Author

Nvm - I figured it out.

Thanks anyway

jiwaniakbiar
Contributor II
Contributor II

I need to do a similar thing. Please can you help me with the expression.

My requirement is as follows:

I am using Group of Region>State>City as one dimension and second as count of Product sale.

I need to present Product wise percentage Sale first at Region level, then at state level and so on

Not applicable
Author

Count(if([Discharged Date],1))/Count(TOTAL([Discharged Date]))

That was my expresion. You just need to change the DIscharged Date to whatever your field name is and it should work!

jiwaniakbiar
Contributor II
Contributor II

Thank you. It helped me to create my expression.