LEVEL
The LEVEL identifier returns the row level in the hierarchy.
Example
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.
![](https://docs.inforiver.com/~gitbook/image?url=https%3A%2F%2F3062809325-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEbkCXCUXmtUq5tcnUtZE%252Fuploads%252FD4hOJLnnqFnmSnv6D59o%252FFormula%2520Level.png%3Falt%3Dmedia%26token%3Da95031c8-d944-4719-b590-6226fc5fffbd&width=768&dpr=4&quality=100&sign=5d8dc475&sv=1)
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.
![](https://docs.inforiver.com/~gitbook/image?url=https%3A%2F%2F3062809325-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FEbkCXCUXmtUq5tcnUtZE%252Fuploads%252Fwb6VkUh78vXryvsRDMjv%252FFormula%2520Level%25202.png%3Falt%3Dmedia%26token%3D246490c3-acdf-4316-8141-06c73f003573&width=768&dpr=4&quality=100&sign=c96c8c5a&sv=1)
Last updated