How to not add another table to your DB (by using Excel!)
Hey blog, how are you? I know I haven't been here for quite some time now... I guess I needed a break. Some time for myself. And I know you were waiting here for me all that time. Being patient and understanding. Knowing that one day, I'll come back. Thank you. I missed you. I think this time, I'm here to stay.
So, the topic for today is how to not work automatically and adding a table to your database. About a year ago, I created a report in SSRS for a user of mine on the distribution of workers of the municipality in different cities in Israel. A year had passed and she needed the same report, but this time she needed to group the cities by areas. My first instinct was to ask her to give me an Excel file containing the cities and the areas they belong to. I was about to import that data to a table I would create for that in my DB. Boris, our trusted DBA, gave me another suggestion. Instead of adding a table and keeping it updated for a query that's usually run just once a year (for the yearly report), he suggested I keep it all in Excel.
That means, I get an Excel file mapping the cities to the areas, download my own Reporting Services report to the same Excel workbook and then use a Vlookup to map the areas to the cities. Last but not least, I created a pivot table on the new data with the total of workers per area and per city.
Needless to say, it didn't take me a lot of time. My customer was delighted to get such a quick response (and I was happy to be done with it so quickly :)). She was eager to know how I managed it so quickly and was interested in learning it herself (as before she planned on doing all the mapping of cities to areas by hand). I told her it wouldn't be a problem to teach her how to do the same herself.
Excel is a powerful and popular tool and Vlookup is a strong function within it - use it in your work and it'll benefit both your work and your customer's!