Daily DAX : Day 321 INFO.CULTURES
Power BI DAX: INFO.CULTURES Function
Description
The INFO.CULTURES
function in Power BI DAX returns a table containing information about the cultures (language and regional settings) supported by the DAX engine. Each row in the resulting table represents a culture with details such as culture name, display name, and associated formats for dates, numbers, and currencies.
Syntax
INFO.CULTURES()
Parameters: None. The function takes no arguments.
Return Value
A table with the following columns:
- Name: The culture code (e.g., "en-US" for English - United States).
- DisplayName: The human-readable name of the culture (e.g., "English (United States)").
- DateTimeFormat: The format used for dates and times in the culture.
- NumberFormat: The format used for numbers, including decimal and thousand separators.
- CurrencyFormat: The format used for currency values.
Use Case
The INFO.CULTURES
function is primarily used for:
- Localization Testing: To verify or display the available cultures for formatting data in reports, ensuring consistency with user regional settings.
- Dynamic Formatting: To create dynamic measures or calculated columns that adapt number, date, or currency formats based on a user's culture.
- Debugging: To troubleshoot issues related to regional settings, such as incorrect date or currency displays in Power BI reports.
Example
Create a table to display all supported cultures and their date formats:
CultureTable = INFO.CULTURES()
This DAX expression creates a table in Power BI listing all cultures with their respective formats. You can then use this table in visuals to explore or apply specific formatting logic.
Notes
- The function is part of the INFO family of DAX functions, introduced to provide metadata about the DAX environment.
- It is particularly useful in multilingual or multi-regional Power BI deployments.
- The function does not require any input and always returns the full list of supported cultures.
Limitations
- The function is read-only and cannot modify culture settings.
- It is available in Power BI versions supporting the
INFO
functions (check compatibility with your version).
Comments
Post a Comment