Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

Percentage calculation Help

Hi Experts,

Can any one please help me on below issue.

Left hand Low% is calculated as like below

=(Count({<[Year]={$(=Max([Year])-1)},

[Rating]={'Low'}>}distinct [ID]))/

(Count({<[Year]={$(=Max([Year])-1)},[Rating]={'Low'}>}distinct [ID])+Count({<[Year]={$(=Max([Year])-1)},[Rating]={'High'}>}distinct [ID])+

Count({<[Year]={$(=Max([Year])-1)},[Rating]={'Medium'}>}distinct [ID]))

Right hand Low% is calculated as like below

=(Count({<[Year]={$(=Max([Year])-1)}>}distinct [ID])/(Count({<[Year]={$(=Max([Year])-1)}>}total distinct [ID])

but both values are not matching

Please help me on this.

Thanks in advance

1 Solution

Accepted Solutions
pawwy1415
Creator III
Creator III
Author

The below expression is working fine

=(Count({<[Year]={$(=Max([Year])-1)},

[Rating]={'Low'}>}distinct [ID]))/

(Count({<[Year]={$(=Max([Year])-1)},[Rating]={'Low'}>}total distinct [ID])+Count({<[Year]={$(=Max([Year])-1)},[Rating]={'High'}>}total distinct [ID])+

Count({<[Year]={$(=Max([Year])-1)},[Rating]={'Medium'}>}total distinct [ID]))

View solution in original post

3 Replies
olivierrobin
Specialist III
Specialist III

hello

the expression are not the same

in the 1st, you take only 'low' values as numerator and in the 2nd one, you take all values

try to add the same set analysis in both

sasiparupudi1
Master III
Master III

May be try

Avg(Aggr((Count({<[Year]={$(=Max([Year])-1)}>}distinct [ID])/(Count({<[Year]={$(=Max([Year])-1)}>}total distinct [ID]),

MonthYear)

)

pawwy1415
Creator III
Creator III
Author

The below expression is working fine

=(Count({<[Year]={$(=Max([Year])-1)},

[Rating]={'Low'}>}distinct [ID]))/

(Count({<[Year]={$(=Max([Year])-1)},[Rating]={'Low'}>}total distinct [ID])+Count({<[Year]={$(=Max([Year])-1)},[Rating]={'High'}>}total distinct [ID])+

Count({<[Year]={$(=Max([Year])-1)},[Rating]={'Medium'}>}total distinct [ID]))