Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to write an expression that represents the index value for given fields.
Example - I want to display the index values of actives vs inactives broken out by an age range.
So for age 18-34, the % actives is the number of actives vs all ages 18-34. Inactives is the balance. To calculate the index I would divide that % of age 18-34 that are active by the overal % of actives, and multiply by 100.
I'm not sure how to write this expression and apply it?
Something like this, maybe?
(count({<Status={'Active'},AgeRange={'18-34'}>} distinct Person)
/count({< AgeRange={'18-34'}>} distinct Person))
/(count({<Status={'Active'}> } distinct Person)
/count( distinct Person))
You don't need to multiply by 100 because you can display fractions as a percentage.
I had a hard time following, but you can use the above syntax to count pretty much any group of people you want, and then it's just a matter of doing the right math with the right group counts.