Srini,
This is not a Cross tab but a very simple vertical table with 3 columns : STATE, CITY and SALES.
I have simply a state and City dimension and there are sales reported City wise. usually state to city is one to many so if I pull State and City and the sales, it gives me sales per multiple cities per state.
Now the requirement is to display only one city per state that has the highest city Sales in that state. This I have achieved by tweaking the SALES metric column with a formula as follows:
[XYZ] =Max([SALES]) ForAll ([CITY])
Now I also tweak the CITY dimension as follows:
=[CITY] Where ([SALES] = [XYZ])
Basically What I did was identified out of all the Cities of a state whats the MAX Sales and restrict the table to show only one city per state with MAX sales as required.
But now there's a small adjustment that needs to be done as per the user. If 2 or 3 Cities have the same MAX Sales, then I need to show all of them. But with this approach I get #Multivalue error wherever there's more than one city with MAX Sales.
I appreciate your help and response on this Srini. But How to resolve this?
Thanks,
RCC