Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
TheBeginner
Contributor II
Contributor II

Percentage Calculation

Hi Everyone,

Can anyone please help me on percentage calculation of a value in a column.

I have a field named Activity Status contains records like Completed, Closed, Open, withheld etc... and also i have a field Activity ID with records 

Now, In a text object I have to shown percentage  of a activities completed

Currently i was using this =Count({<[Activity Status] = {'Completed'}>} DISTINCT [Activity ID])

Count( DISTINCT [Activity ID])

It is working fine but the problem is when we have not applied any filters on Activity Status i mean if i have not applied any filters it is showing 14.03% this is correct but if i'm applying any filter like if i'm filtering with suspending or anything the value is wrong . Could anyone please help me out.

Thanks in advance.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

I am assuming you want this to be static only for the status field selection. Then try like:

Num(

Currently i was using this =Count({<[Activity Status] = {'Completed'}>} DISTINCT [Activity ID])

Count( {<[Activity Status]>} DISTINCT [Activity ID])

, '#,##0.00')

Num() for controlling decimal precision.

View solution in original post

4 Replies
tresesco
MVP
MVP

What do you expect to see (any change ?) in the result while you are selecting other values?

TheBeginner
Contributor II
Contributor II
Author

Hi Thanks for reply,

The result should be static until unless i have added any record marked as completed in database other wise the value should be static and also i only need two decimals after point. Could you please help me out.

Thanks in advance

 

tresesco
MVP
MVP

I am assuming you want this to be static only for the status field selection. Then try like:

Num(

Currently i was using this =Count({<[Activity Status] = {'Completed'}>} DISTINCT [Activity ID])

Count( {<[Activity Status]>} DISTINCT [Activity ID])

, '#,##0.00')

Num() for controlling decimal precision.

TheBeginner
Contributor II
Contributor II
Author

Hi @tresesco thanks alot it worked.