How to sum values based on selections at different levels
Below is my raw table and final output table with bands (range). However, my expressions (Total Account & Amount) aren't working.
Attached is a sample qvw.
Based on what selection (State, County, City or Zip) is made, the Amount should fall in the corresponding range. Selection can be one state or multiple states and so forth. I tried using set analysis but didn't quite get the correct result.
Hi Sunny, yes you are right - I think I missed some data rows. However, during my testing I found this expression didn't work in the above examples. Screen shots attached.
1) First image, when NJ state and Lehigh2 city is selected, the final table displays 0. Correct total account is 1 and amount is 21617 2) Second image, when NJ state and Lehigh1+Lehigh2 city is selected, the final table still displays 0. Correct total account is 2 and amount is 21617 + 1125 = 22742