Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Please help me.
Count(TransactionId)/Max( total aggr(Count(TransactionId),EmpCode)) as the expression for percentage
please check the date once you may need to use date function there . Use this expression in measure
count({<TRANSACTION_TYPE={'RECEIVE'},TRANSACTION_DATE={">=$(=today()-7)"}>}TRANSACTION_ID)
MAXIMUM =
max( total AGGR(count({<TRANSACTION_TYPE={'RECEIVE'},TRANSACTION_DATE={">=$(=today()-7)"}>}TRANSACTION_ID),your_dim_here))
with respect to what you want to calculate the average ? you need to be more clear on that.
u might need to add = before today()
count({<TRANSACTION_TYPE={'RECEIVE'},TRANSACTION_DATE={">=$(=today()-7)"}>}TRANSACTION_ID)
Thank You Pradosh
There is problem with the date
apart from date your expression is working
I need another thing
Here I have 3 columns
Emp Code | Transaction Count | Percentage |
---|---|---|
1001 | 325 | 325/524*100 |
1002 | 524 | 524/524*100 |
1003 | 478 | 478/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
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
Pradosh
thank you omar. edited now.
Hi Pradosh
Percentage is not calculating using max function.
It is showing same for all
I have attached sample data. please have a look
Count(TransactionId)/Max( total aggr(Count(TransactionId),EmpCode)) as the expression for percentage
Thank You So Much Pradosh
This is working
I was missing the 'Total' keyword
Pleasure Shahzad.
If your query is answered, Please close the thread by marking the correct answer and useful comments as USEFUL. It will help others who search for the similar issues in future.