JSON to DAX Converter

Transform JSON data into DAX table expressions

JSON Input

DAX Output

About JSON to DAX Converter

Convert JSON data to DAX (Data Analysis Expressions) table expressions for Power BI, Analysis Services, and Power Pivot. DAX is a formula language used for data modeling and business intelligence.

Key Features

  • Table Generation: Creates DAX table expressions with VAR and RETURN syntax
  • Type Conversion: Properly converts JSON types to DAX functions (TRUE(), FALSE(), BLANK())
  • Custom Table Names: Specify your own variable name for the generated table
  • Multiple Formats: Supports arrays of objects, single objects, and primitive values
  • Nested Data: Handles nested objects and arrays by stringifying them
  • File Upload: Upload JSON files directly or paste data
  • Instant Preview: Real-time conversion as you type

How to Use

  1. Input JSON Data: Paste your JSON data or upload a .json file
  2. Configure Options: Set the table name for the DAX variable
  3. Review Output: The DAX output updates automatically
  4. Copy or Download: Use the Copy or Download button to save your DAX code

Example Conversion

JSON Input:

[
  {"name": "John", "age": 28, "sales": 15000},
  {"name": "Jane", "age": 34, "sales": 22000}
]

DAX Output:

VAR Data = {
  ("John", 28, 15000),
  ("Jane", 34, 22000)
}
RETURN Data

Common Use Cases

  • Power BI: Create calculated tables from JSON data
  • Data Modeling: Generate DAX expressions for data models
  • Testing: Create sample data tables for DAX formula testing
  • Migration: Convert JSON data to DAX for Analysis Services
  • Prototyping: Quickly create DAX tables from API responses

DAX Type Mapping

  • String: JSON strings → DAX quoted strings
  • Number: JSON numbers → DAX numeric literals
  • Boolean: JSON true/false → DAX TRUE()/FALSE()
  • Null: JSON null → DAX BLANK()
  • Object/Array: Nested structures → JSON strings

DAX Functions Used

  • VAR: Declares a variable to store the table
  • RETURN: Returns the table variable
  • TRUE(): Boolean true value
  • FALSE(): Boolean false value
  • BLANK(): Represents null or empty values

Privacy & Security

All conversions happen locally in your browser. Your JSON data is never uploaded to any server, ensuring complete privacy and security.