DROPLEVEL
Basic Overview
Description | Removes one or multiple levels from the input. All finer levels on the same hierarchy are also removed (e.g. Month and Day will be removed if you remove the level Quarter). |
Syntax | DROPLEVEL(Node, Level1[ ,Level2, ...] [AggregationType]) |
Parameter |
|
Example
The node contains the Month level. The time dimension contains the Day, Month, Quarter and Year levels. Learn more: Dimension & Hierarchy Management
Input Revenue =
Month | Product | Revenue |
---|---|---|
2019-01 | A | 57 |
2019-01 | B | 38 |
2019-02 | A | 68 |
2019-02 | B | 76 |
Output DROPLEVEL('Revenue', "Month") =
Year | Product | Revenue |
---|---|---|
2019 | A | 57 + 68 = 125 |
2019 | B | 38 + 76 = 114 |
Output DROPLEVEL('Revenue', "Product") =
Month | Value |
---|---|
2019-01 | 57 + 38 = 95 |
2019-02 | 68 + 76 = 144 |
Additional Hints
By combining the DROPLEVEL() and EXPAND() functions, you can get the days in a month very easily. Find further information on the functionalities of Combined Operations.