I am counting the number of uniques stores for a subdimension, say Brand. I then want to find in want percentage of stores this brand is listed in. This is what the above expression does. In this case the set analysis allows me to use a particular calendar week. But what if I had as my first dimension in the table the Storetype, and I want to see what percentage my brand has not of the total count storenumber, but of the total count storenumber belonging to the storetype. In other words the total number of one storetype would be always be 100%.
I would want to take the percentage of the subtotal rather than of the grand total.
I would add a screen capture, but i don't kow how to paste that in here.
Any hints from anyone? It is probably the aggr() function, but I cannot seem to gt that to work.