#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
⚡ FREE · 15 MEASURE TYPES

DAX Formula Generator: Power BI Measures Without the Guesswork

Enter your table and column names, pick a calculation and get a clean, commented DAX measure.

  • 📅 Time intelligence
  • 📊 % of total and rank
  • 🇮🇳 April–March year

How to use the DAX Formula Generator

  1. 1. Name your modelEnter the fact table, value column, measure name and date table.
  2. 2. Pick a calculationTotals, YTD, YoY %, running totals, moving averages, rank, top N and more.
  3. 3. Paste into Power BICopy the measure (and its base measure) into Modeling → New measure.

What it generates

The generator writes DAX in the style Power BI experts recommend. There are explicit base measures and VAR … RETURN for readability, DIVIDE instead of / for safe division, and REMOVEFILTERS-style ALL patterns for shares. Time intelligence covers TOTALYTD with an optional 31 March year end for the Indian financial year, TOTALMTD/TOTALQTD, SAMEPERIODLASTYEAR, DATEADD, running totals and moving averages with DATESINPERIOD. There are also % of category with ALLEXCEPT, RANKX with ISINSCOPE, TOPN totals, AVERAGEX per item and single-value CALCULATE filters. Table names are quoted where DAX needs it, for example 'Date'[Date].

Worked example

With a Sales table, an Amount column and a date table called Date, choosing Year-to-date with the year ending 31 March gives Total Sales YTD = TOTALYTD ( [Total Sales], 'Date'[Date], "3/31" ), plus the base measure Total Sales = SUM ( Sales[Amount] ). Choosing Year-on-year growth gives a VAR-based measure that compares [Total Sales] with CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) ) using DIVIDE. If this year is ₹12 lakh against ₹10 lakh last year, it shows 20%.

Before you paste

  • Time intelligence needs a proper date table: one row per day, no gaps, marked as the date table and related to your fact table.
  • We check brackets, quotes and names, but we can't run DAX outside Power BI, so test each measure in a visual.
  • The same DAX works in Power Pivot in Excel and in Analysis Services.

Frequently asked questions

Why does it add a base measure?

Time-intelligence measures refer to [Total Sales]; creating it once and reusing it keeps your model consistent and easier to change.

Is 'Date' a problem as a table name?

It's common, but DATE is also a function, so the name must be quoted as 'Date'. The generator does this automatically.

Is the DAX formula generator free?

Yes. You can open the DAX formula generator and use it without signing up. When you generate a measure for the first time, we ask once for your name and WhatsApp number; after that it, and every other Uncodemy tool, opens straight away.

More free tools

See all free tools