Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Writing percent expression

Nvm - I figured it out.

Thanks anyway

6 Replies

Re: Writing percent expression

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

Re: Writing percent expression

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

Re: Writing percent expression

Nvm - I figured it out.

Thanks anyway

jiwaniakbiar
New Contributor

Re: Writing percent expression

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

Re: Writing percent expression

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
New Contributor

Re: Writing percent expression

Thank you. It helped me to create my expression.

Community Browser