Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello I have the following expression:
(Count({<CPT_CATEGORY={Cosmetic Procedure}>}distinct ENCID))/(Count(Distinct [ENCID]))
Its giving me an error.
I am trying to count Cosmetic ENCID's as a % of total ENCID's
Thanks.
Hi Ashley,
Try this:
Count({<CPT_CATEGORY={'Cosmetic Procedure'}>}distinct ENCID)/Count(Distinct [ENCID])
hope it helps...
Hi Ashley,
Try this:
Count({<CPT_CATEGORY={'Cosmetic Procedure'}>}distinct ENCID)/Count(Distinct [ENCID])
hope it helps...
Hi Ashley,
It seems that its due to missing double quotes in the set modifier. If you wish to calculate percentage of cosmetic products against the total products, TOTAL could be used in the count aggregation.
(Count({<CPT_CATEGORY={'Cosmetic Procedure'}>}distinct ENCID))/(Count(TOTAL Distinct [ENCID]))
Alternatively, if you want to convert this to percentage, Num can be used .
Num( (Count({<CPT_CATEGORY={'Cosmetic Procedure'}>}distinct ENCID))/(Count(TOTAL Distinct [ENCID])) , '#.0%')
=Count({<CPT_CATEGORY={'Cosmetic Procedure'}>}distinct ENCID)/Count(Distinct [ENCID])
Thank you all of your answers work
Please close this post.