Wow that is beautiful...I do not have programming mind to think like that.
I am learning a lot from you... thank you Rogerio!!!!
Below is not main topic of this thread but I want to ask you question if you do not mind.
1. My table has following 2 characteristics.
-does not have row aggregation
-merged dimension with details as columns
*Please bear with me. Instead of throwing in too much information in my question,
I try to convey the core of the problem in a simple way.
When I tried your formula, the sum was double of sum + some duplicates.
Does this mean if you have merged dimension, the line number will count lines of both dimensions in merged dimension, therefore return double?
If you have further information, could you please guide me...?
Thank you...