LEVEL
Last updated
Last updated
The LEVEL identifier returns the row level in the hierarchy.
We have Region, Country, State and Product Name which denotes each level. The row grand total will be considered as 1st level followed by Region as 2nd level, Country as 3rd Level, State as 4th Level and Product Name as 5th level.
For each city, we need to calculate the tax amounts based on level. Using the level formula, we get each hierarchy value and multiply it with the tax% value to arrive at the tax value.