Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to do a calculation, in a straight table, that counts the number of customers by a particular category. A person can show up in multiple categories. I want the denominator to be based on the total number of unique customers and the numerator to be based on the total in that particular category. I'm guessing I'd do something with the aggr function or set analysis, but I can't seem to get the correct answer. Any help is much appreciated.
I've attached a sample qvw as reference.
thanks,
rob
Hello Rob, enclosed you will find the expected values, the solution was quite simple so I do not know if this is what you where expecting.
Regards
Hello Rob, enclosed you will find the expected values, the solution was quite simple so I do not know if this is what you where expecting.
Regards
Hi Rob
Simple solution to this one, you simply need to add the "Total" identifier to your expression for % of Total as follows:
=count(distinct customer_id)/count(total distinct customer_id)
Hope it helps,
Ivan and Nigel,
Thank you both for taking the time to provide your solutions. I thought it might be something I was missing.
rob