Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I'm trying to add a weighting to a count based on dividing 2 percentages and then multiplying them by the old count across certain dimensions. If I put this in a straight table with dim1, dim2 and dim3 then create a normal expression total I get the result the aggr is giving but what I want is what I get when I change the expression total to sum of rows - can anyone advise how I can get this kind of result from an aggr expression? Here's the expression I have that is giving the normal expression total as a result:
=sum(
aggr(
(((count({<FlagA={1}>} ACCOUNT_ID)
/count({<FlagA={1}>} TOTAL ACCOUNT_ID))
/
(count({<FlagB={1}>} ACCOUNT_ID)
/count({<FlagB={1}>} TOTAL ACCOUNT_ID)))
*count({<FlagB={1}>} ACCOUNT_ID)),
dim1, dim2, dim3))
Please can someone advise?
Thanks
=SUM(Aggr((((count({<flagA={1}>} account_ID)
/count({<flagA={1}>} TOTAL account_ID))
/
(count({<FlagB={1}>} account_ID)
/count({<FlagB={1}>} TOTAL account_ID)))),dim1,dim2,dim3)
*Aggr(Count(account_ID),dim1,dim2,dim3))
=Avg(
aggr(
(((count({<FlagA={1}>} ACCOUNT_ID)
/count({<FlagA={1}>} TOTAL ACCOUNT_ID))
/
(count({<FlagB={1}>} ACCOUNT_ID)
/count({<FlagB={1}>} TOTAL ACCOUNT_ID)))
*count({<FlagB={1}>} ACCOUNT_ID)),
dim1, dim2, dim3))
Can you give sample QVW with data?
Or may be
=sum(TOTAL
aggr(
(((count({<FlagA={1}>} ACCOUNT_ID)
/count({<FlagA={1}>} TOTAL ACCOUNT_ID))
/
(count({<FlagB={1}>} ACCOUNT_ID)
/count({<FlagB={1}>} TOTAL ACCOUNT_ID)))
*count({<FlagB={1}>} ACCOUNT_ID)),
dim1, dim2, dim3))
the first parameter of the aggr function should also be a function. this probabluy work
=sum(
aggr(
sum(
(
(
count({<FlagA={1}>} ACCOUNT_ID) /count({<FlagA={1}>} TOTAL ACCOUNT_ID)
)
/
(
count({<FlagB={1}>} ACCOUNT_ID)/count({<FlagB={1}>} TOTAL ACCOUNT_ID)
)
)
*
count({<FlagB={1}>} ACCOUNT_ID)
),
dim1, dim2, dim3))
Hi
thanks for replying, unfortunately your suggestions didn't work the way I was looking for.
If you look at the attached I'm looking to get the 73.8466 result but using a single expression, i.e. without the need for a chart.
Thanks for helping
=SUM(Aggr((((count({<flagA={1}>} account_ID)
/count({<flagA={1}>} TOTAL account_ID))
/
(count({<FlagB={1}>} account_ID)
/count({<FlagB={1}>} TOTAL account_ID)))),dim1,dim2,dim3)
*Aggr(Count(account_ID),dim1,dim2,dim3))