Go to Sign up
Note: Your files never leave your device. We don't upload, transfer, or store your data.
|
|
|
|
|---|---|---|
|
|
|
DAX (Data Analysis Expressions) is the formula language behind Microsoft Power BI, Power Pivot for Excel, and SQL Server Analysis Services Tabular models. A common task when building Power BI reports is creating small lookup or dimension tables directly in the data model — without importing external files. The CSV to DAX Table Converter on A.Tools generates the DAX code for these calculated tables from any CSV or TSV file.
Paste the output into Power BI Desktop's New Table dialog and your data is instantly available in the model.
All processing runs locally in your browser. No data leaves your device.
Uses the DATATABLE() function with explicit column names and data types:
MyTable =
DATATABLE (
"Name", STRING,
"Age", INTEGER,
"Salary", DOUBLE,
{
("Alice", 30, 75000.50),
("Bob", 25, 62000.00)
}
)
Advantages:
Explicit data types prevent type inference errors.
Fully typed columns ensure correct sorting, filtering, and relationships.
Recommended for production Power BI models.
Uses the curly-brace {} constructor with inline ROW() calls:
MyTable =
{
ROW("Name", "Alice", "Age", 30, "Salary", 75000.50),
ROW("Name", "Bob", "Age", 25, "Salary", 62000.00)
}
Advantages:
More compact syntax.
Faster for quick prototyping.
Column names are defined inline.
The tool automatically detects column data types from your CSV content:
| CSV Value Pattern | DAX Type | Example |
|---|---|---|
"Alice", "NYC" | STRING | STRING |
30, -5 | INTEGER | INTEGER |
75000.50, 3.14 | DOUBLE | DOUBLE |
true, false | BOOLEAN | BOOLEAN |
2026-05-07 | DATETIME | DATETIME |
DATATABLE format includes these types explicitly. TABLE format relies on DAX runtime inference.
Enter a name in the Table Name field to prefix the DAX expression: TableName = DATATABLE(...). If left empty, only the right side of the expression is generated.
| Option | Use Case |
|---|---|
| 2 Spaces | Compact, matches most DAX style guides |
| 4 Spaces | Wider readability, matches Power BI Desktop default |
| Tab | If your DAX formatter uses tabs |
Edit your data in-browser before converting:
Undo / Redo — Full edit history.
Add / Delete Rows & Columns — Expand or trim the table.
Transpose — Swap rows and columns.
Delete Empty — Remove empty rows and columns.
Deduplicate — Remove duplicate rows.
ABC / abc / Abc — Batch case conversion.
Find & Replace — With regex support.
First Row as Header — Toggle header treatment.
All processing runs client-side via the browser File API. Files are never uploaded, transmitted, or stored. Safe for business-sensitive dimension data, organizational structures, and proprietary lookup tables.
Upload a .csv or .tsv file by dragging it onto the upload area, or click to browse. Alternatively, click Enter Data to type or paste data directly.
Use the toolbar to refine your data:
Add, insert, or delete rows and columns.
Transpose the table.
Remove empty rows/columns or duplicate rows.
Change text case.
Find and replace values (supports regex).
Toggle First Row as Header to define column names.
In the Properties panel:
| Option | What to Set |
|---|---|
| Format | DATATABLE (typed) or TABLE (compact) |
| Indent | 2 spaces, 4 spaces, or tab |
| Table Name | The name for the calculated table in Power BI (e.g., DimProduct) |
Click Convert. The DAX code appears in the Output Data panel.
Open Power BI Desktop.
Go to Modeling > New Table.
Paste the DAX code into the formula bar.
Press Enter. The table appears in your data model.
Input CSV:
CategoryID,CategoryName,SubCategory
1,Electronics,Phones
2,Electronics,Laptops
3,Home,Appliances
4,Home,Furniture
Settings: Format = DATATABLE, Indent = 4, Table Name = DimCategory
Output:
DimCategory =
DATATABLE (
"CategoryID", INTEGER,
"CategoryName", STRING,
"SubCategory", STRING,
{
( 1, "Electronics", "Phones" ),
( 2, "Electronics", "Laptops" ),
( 3, "Home", "Appliances" ),
( 4, "Home", "Furniture" )
}
)
Input CSV:
Quarter,Label,Q1Start,Q1End
Q1,Jan-Mar,2026-01-01,2026-03-31
Q2,Apr-Jun,2026-04-01,2026-06-30
Q3,Jul-Sep,2026-07-01,2026-09-30
Q4,Oct-Dec,2026-10-01,2026-12-31
Settings: Format = TABLE, Indent = 2, Table Name = QuarterRef
Output:
QuarterRef =
{
ROW("Quarter", "Q1", "Label", "Jan-Mar", "Q1Start", "2026-01-01", "Q1End", "2026-03-31"),
ROW("Quarter", "Q2", "Label", "Apr-Jun", "Q1Start", "2026-04-01", "Q1End", "2026-06-30"),
ROW("Quarter", "Q3", "Label", "Jul-Sep", "Q1Start", "2026-07-01", "Q1End", "2026-09-30"),
ROW("Quarter", "Q4", "Label", "Oct-Dec", "Q1Start", "2026-10-01", "Q1End", "2026-12-31")
}
Input CSV:
Scenario,GrowthRate,DiscountFactor
Optimistic,0.15,0.95
Base,0.08,0.90
Pessimistic,0.02,0.85
Settings: Format = DATATABLE, Indent = 2, Table Name = Scenarios
Output:
Scenarios =
DATATABLE (
"Scenario", STRING,
"GrowthRate", DOUBLE,
"DiscountFactor", DOUBLE,
{
( "Optimistic", 0.15, 0.95 ),
( "Base", 0.08, 0.90 ),
( "Pessimistic", 0.02, 0.85 )
}
)
DAX (Data Analysis Expressions) is a formula language introduced by Microsoft for use in Power BI, Power Pivot, and SSAS Tabular models. It extends Excel's formula capabilities with relational data operations, time intelligence, and table manipulation functions. Reference: Microsoft Learn — DAX reference.
DATATABLE() creates an inline table with explicit column definitions:
TableName =
DATATABLE (
"Column1", TYPE1,
"Column2", TYPE2,
{
(value1, value2),
(value3, value4)
}
)
Supported DAX data types:
STRING — Text values.
INTEGER — Whole numbers.
DOUBLE — Floating-point numbers.
BOOLEAN — True/false.
DATETIME — Date and time values.
CURRENCY — Fixed-precision decimal numbers.
{} The curly-brace constructor creates a table from ROW() calls:
TableName =
{
ROW("Col1", val1, "Col2", val2),
ROW("Col1", val3, "Col2", val4)
}
DAX infers types from the first row's values. This is simpler but less explicit.
DAX calculated tables are ideal for:
Dimension/lookup tables — Product categories, regions, status codes.
Date reference tables — Fiscal calendars, holiday lists.
What-if parameters — Scenario analysis tables.
Bridge tables — Many-to-many relationship resolution.
Static reference data — Exchange rates, mapping tables.
They are stored in the Power BI data model and refreshed on dataset refresh. For large datasets (hundreds of rows), consider importing via Power Query instead.
DAX calculated tables are static — they do not connect to external data sources.
Very large tables (thousands of rows) generate lengthy DAX code that may slow down Power BI Desktop.
DATATABLE supports up to 64 columns and is subject to Power BI's 1MB formula bar limit.
No. All file processing happens entirely in your browser using JavaScript. Your CSV data is never uploaded, transferred, or stored on any server.
DAX (Data Analysis Expressions) is the formula language used in Microsoft Power BI, Power Pivot for Excel, and SQL Server Analysis Services Tabular models. It is used to define calculated columns, measures, and calculated tables. See Microsoft Learn DAX reference for the official documentation.
DATATABLE uses the DATATABLE() function with explicit column names and data types, producing a fully typed table. TABLE uses the {} constructor with ROW() calls, which is more compact but relies on DAX type inference. Use DATATABLE for production models; use TABLE for quick prototyping.
In Power BI Desktop, go to Modeling > New Table. A formula bar appears at the top of the screen. Paste the generated DAX code and press Enter. The table will be created in your data model.
The DATATABLE format supports STRING, INTEGER, DOUBLE, BOOLEAN, DATETIME, and CURRENCY. The tool auto-detects types from your CSV data. The TABLE constructor format relies on DAX runtime inference.
DAX calculated tables are limited by Power BI's formula bar size (approximately 1MB of DAX text). For most dimension tables with 10-20 columns, this supports up to a few hundred rows. For larger datasets, import via Power Query instead.
The tool accepts .csv (comma-separated values) and .tsv (tab-separated values) files. You can also enter data manually through the built-in table editor.
Yes. The generated DAX code works in both Power BI Desktop and Power Pivot for Excel. In Excel, go to Power Pivot > Design > Create Calculated Table and paste the code.