# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
New Contributor III

## Dividing count with sum?

Hi,

I have a table that lets say shows salesmen, month, sales and reasons for sale. If sale has happened it is stated with 1 - if not it says 0.

Reasons are counted as these are stated with text. In the last colum I want to show the percentage of sales by dividing with reason, but I can't get this working. Either the result is 0%, 100% or even higher

In the Sales dimension there is a expression calculating sales for the selected month;

Sum({1<sales ={"1"},[Month]=p([Month])>}sales)

In the Reason dimension there is a expression counting reasons

Count(reasons)

SalesmenMonthSalesReasonsPercentage
JohnJAN200599,97%
DaveJAN5050100,00%
MaryJAN1001099,90%
KateJAN1502099,86%
Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: Dividing count with sum?

Is this not working?

1 - (Count(reasons)/Sum({1<sales ={"1"},[Month]=p([Month])>}sales))

4 Replies
MVP

## Re: Dividing count with sum?

So what are the expected numbers that you are looking to get?

New Contributor III

## Re: Dividing count with sum?

Oops - sorry, was a little bit late yesterday!

The output I want is Reasons/Sales-100%

I have updated the table.

MVP

## Re: Dividing count with sum?

Is this not working?

1 - (Count(reasons)/Sum({1<sales ={"1"},[Month]=p([Month])>}sales))

New Contributor III

## Re: Dividing count with sum?

Hi Sunny,

Thank you ever so much! This was the correct input

Regards

Nina

Community Browser