dimension totalling logic

NAV dimension value table has totaling option…for example: lets say the dimension values are a, b, c, d, e…z. then we can have totalling as

total1 a…d|m|x…z

in the underlying sql table, i see the above is kept as it is…so when i am directly working with sql server tables and queries, i cannot apply this filter… i am looking for ideas to convert this totaling filter in such a way so that it can be used in sql query…

preferably i will like to have dynamic coversion so that any changes in nav is reflected sametime, if this is not possible without dense complexity, i can go to offline solution and update data periodically.