Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have calculated Distribution Percentage and i need avg of distribution percentage. i tried to calculate but the values are not matching.
(line_srvc_cnt/sum(total line_srvc_cnt)*100) is for Distribution Percentage
aggr(avg({<[Provider Id]=>}(line_srvc_cnt/sum(total line_srvc_cnt)*100)),[HCPCS Code]) is for Avg of Distribution Percentage
Is there any alternate option to calculate the Average.
Thanks in Advance
Look at Average – Which average?
Concerning your expressions:
1. You shouldn't have naked field references (See Use Aggregation Functions!😞
line_srvc_cnt/sum(total line_srvc_cnt)*100
2. You need to wrap your Aggr() function in an aggregation function. Otherwise you will have exactly the same problem with the Aggr() as you have with naked field references: If there are multiple values, it will be interpreted as NULL. Hence:
Avg( Aggr( ... ) )
HIC
Hi,
Try this expression
avg({<[Provider Id]=>} aggr(Sum({<[Provider Id]=>} line_srvc_cnt)/sum({<[Provider Id]=>} total line_srvc_cnt),[HCPCS Code])) * 100
Regards,
Jagan.
Hi jagan,
I tried the expression what u have posted still i'm not getting the values
Hi,
Can you attach sample file?
Regards,
Jagan.