# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor II

## How to calculate Average and Max with Count Expression

Hi Everyone

I want to calculate average and Max for this expression

My Measure is like this:

Count(if(TRANSACTION_DATE >= today()-7 and TRANSACTION_TYPE='RECEIVE', TRANSACTION_ID))

I want to calculate Average and Max.

1 Solution

Accepted Solutions
Valued Contributor III

## Re: How to calculate Average and Max with Count Expression

Count(TransactionId)/Max( total aggr(Count(TransactionId),EmpCode)) as the expression for percentage

9 Replies
Valued Contributor III

## Re: How to calculate Average and Max with Count Expression

please check the date  once you may need to use date function there . Use this expression in measure

MAXIMUM =

with respect to what you want to calculate the average ? you need to be more clear on that.

Esteemed Contributor

## Re: How to calculate Average and Max with Count Expression

u might need to add = before today()

Contributor II

## Re: How to calculate Average and Max with Count Expression

There is problem with the date

apart from date your expression is working

I need another thing

Here I have 3 columns

Emp CodeTransaction CountPercentage
1001325325/524*100
1002524524/524*100
1003478478/524*100

EmpCode & Transaction Count is calculated. I need a measure to calculate 'Percentage'

The formula should be

TransactionCount/Max(Transaction Count)*100

325/524*100

Valued Contributor III

## Re: How to calculate Average and Max with Count Expression

try adding = before today() as omar suggested i missed that. Date should work and it is still not then use  =date(today()-7,your_dateformat) in pace of today()-7

for percentage you can use[Column name]/ Max_expression *100

regards

Valued Contributor III

## Re: How to calculate Average and Max with Count Expression

thank you omar. edited now.

Contributor II

## Re: How to calculate Average and Max with Count Expression

Percentage is not calculating using max function.

It is showing same for all

I have attached sample data. please have a look

Valued Contributor III

## Re: How to calculate Average and Max with Count Expression

Count(TransactionId)/Max( total aggr(Count(TransactionId),EmpCode)) as the expression for percentage

Contributor II