Skip to main content

%LABEL (MDX)

Given an MDX expression, returns the same expression with a different label for use as a row or column header. %LABEL can also specify formatting for the row or column. This function is a Business Intelligence extension to MDX.

Returned Type

This function returns an expression of the same type that you use with the function.

Syntax and Details

%LABEL(MDX_expression,label,format_string,solve_order,cell_style,heading_style)

Where:

  • MDX_expression is an MDX expression of any type.

  • label is a string to use as the new label as a row or column header.

  • format_string is an optional literal (such as "#.##") that specifies how to display the values. See FORMAT_STRING Clause.

  • solve_order is an optional integer that specifies the order in which to apply labels. See SOLVE_ORDER Clause.

  • cell_style is an optional literal that specifies a Cascading Style Sheet (CSS)Opens in a new tab style definition to apply to the data cells.

  • heading_style is an optional literal that specifies a Cascading Style Sheet (CSS) style definition to apply to the heading.

Example

SELECT %LABEL(MEASURES.[avg allergy count],"my label") ON 0, colord.MEMBERS ON 1 FROM patients

                                  my label
1 None                                 1.04
2 Blue                                 1.01
3 Green                                1.02
4 Orange                               1.01
5 Purple                              1.06
6 Red                                  1.03
7 Yellow                               1.00

In contrast:

SELECT MEASURES.[avg allergy count] ON 0, colord.MEMBERS ON 1 FROM patients

                         Avg Allergy Count
1 None                                 1.04
2 Blue                                 1.01
3 Green                                1.02
4 Orange                               1.01
5 Purple                               1.06
6 Red                                  1.03
7 Yellow                               1.00

For more examples, see %CELL, CURRENTMEMBER, IIF, and PROPERTIES.

See Also

Purpose of this instance: Draft documentation
DocReleaseID: HealthConnect2025.1
Content loaded from:
/staging/learning/iris-doc/2025.1.x/doc/cache/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/ensemble/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/healthconnect/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/healthcommon/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/security/en-us/src/
Excluded items: AADAN, ABIT, ACLOUD, AFL_adonet, AFL_ecp, AFL_icm, AFL_jdbc, AFL_netxep, AFL_sharding, AFL_xep, APMML, APOWER, ARGATEWAY, AWEBSOCKETS, AWSGI, BJAVA, BJAVNAT, BJAVPER, BJAVXEP, BJSNAT, BNET, BNETNAT, BNETODBC, BNETXEP, BPYNAT, BSPK, BTPI, BXCI, GAUTOML, GCONV, GCSP, GICM, GIKNOW, GIML, GISQ, GISR, GSCF, GSQLSRCH, GTSQ, GUIMA, PAGE_activex, PAGE_administration, PAGE_apimgr, PAGE_appdev_ides, PAGE_bi, PAGE_cachedirect, PAGE_data_migration, PAGE_data_science, PAGE_deployment, PAGE_deployment_configuration, PAGE_deployment_containers, PAGE_deployment_icm, PAGE_deployment_iko, PAGE_deployment_install, PAGE_dotnet, PAGE_dotnet_native, PAGE_dsvr, PAGE_embedded_language_development, PAGE_epython, PAGE_external_language_development, PAGE_interop, PAGE_interop_lifecycle, PAGE_interop_vdoc, PAGE_interoperability, PAGE_java, PAGE_java_jdbc, PAGE_java_native, PAGE_machine_learning, PAGE_monitoring, PAGE_multimodel, PAGE_multimodel_multidimensional, PAGE_multimodel_object, PAGE_multivalue, PAGE_native, PAGE_nodejs_native, PAGE_objectscript, PAGE_objectscript_ides, PAGE_odbc, PAGE_platform_arch_design, PAGE_pygate, PAGE_python, PAGE_python_native, PAGE_reports, PAGE_scalability, PAGE_security_authentication, PAGE_security_authorization, PAGE_studio, PAGE_zen, PAGE_zenmojo, PAGE_zenreports
FeedbackOpens in a new tab