Ravindra BagaleCourses & study guides मराठी Track your progress

6. Power Query Essentials

6.5 Data Types

Start with a problem

Zoya changes Order Date to Date and sees 04-Jun-2026 for an order placed on 6 April. Amount is still text, so the sum fails.

Explain simply

A data type says what a column holds. Fix text first (remove ₹ and commas), then set types. For Indian dd-mm-yyyy dates use Change Type › Using Locale › English (India).

Show the data

Before (after 6.4 steps):

Order Date (Text) Amount (Text)
06-04-2026 ₹1,250
06-04-2026 ₹980
07-04-2026 ₹450

About this data: This table uses columns: Order Date (Text), Amount (Text). This table uses columns: Order Date, Amount. This table uses columns: Order Date (Date), Amount (Fixed decimal). Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: pq_raw_pune_export.csv (source: src/practice/).

Demonstrate

  1. Select Amount › Transform › Replace Values › find ₹ › replace with nothing. Repeat for ,.

    Your result should look like this:

    Amount (Text)
    1250
    980
    450
  2. Click the ABC icon on Amount › Fixed decimal number.

    Your result should look like this:

    Amount (Fixed decimal)
    1,250.00
    980.00
    450.00
  3. Right-click Order Date › Change Type › Using Locale… › Data type Date, Locale English (India) › OK.

    Your result should look like this:

    Order Date (Date)
    06-Apr-2026
    06-Apr-2026
    07-Apr-2026
  4. Check the header icons: calendar for Order Date, 1.2/₹ for Amount.

Show the result

Your result should look like this (fictional sample):

Order Date Amount
06-Apr-2026 1,250.00
06-Apr-2026 980.00
07-Apr-2026 450.00

Explain what happened

With locale en-IN, Power Query reads 06-04 as day-month. Removing symbols first lets the text convert to numbers without errors.

Explore further

  • Fixed decimal (Currency) avoids floating-point rounding surprises for money.

Detailed reference for this lesson:

Data types in Power Query with example — in 30 seconds

What: A data type tells Power BI what a column holds: text, whole number, decimal, date and so on.

Why: If Amount stays as text, Power BI cannot add it. If a date stays as text, YTD and month charts break.

Tiny example: "₹1,250" is text. After cleaning and a type change it becomes the number 1250.

First look at the data (before → after):

Data types in Power Query with example: before and after tables, fictional Blinkit Maharashtra data

Same before / after tables as text

Before — Mumbai shop export — everything is text

Order Date (Text) Amount (Text)
14-03-2025 ₹1,250
15-03-2025 ₹980

Formula / click path

Replace Values: "₹" → "" and "," → ""
Change Type › Using Locale › Date, English (India)

After — After cleaning

Order Date (Date) Amount (Fixed decimal)
14-03-2025 1250.00
15-03-2025 980.00

Do it step by step:

  1. Select Amount. Click Transform › Replace Values. Replace ₹ with nothing.
  2. Do it again. Replace , with nothing.
  3. Click the type icon on Amount. Choose Fixed decimal number.
  4. Right-click Order Date › Change Type › Using Locale…
  5. Choose Date and locale English (India). Click OK.
  6. Check: the date column icon now shows a calendar.

Setting correct data types is essential – DAX, sorting, relationships (संबंध) and performance depend on it. Click the icon on the column header or use Transform › Data Type.

Type Use for
Text Names, codes, IDs with leading zeros, phone numbers
Whole number Quantities, counts, integer IDs
Decimal number Measurements, percentages
Fixed decimal number (Currency) Money values – 4 fixed decimal places, avoids rounding issues
Date / Time / Date/Time / Date/Time/Timezone Dates and timestamps
True/False Flags such as Is Returned

Simple bhashet sangaycha tar, fixing wrong types, Indian date formats (Using Locale) and numbers stored as text is covered step by step in Module 7.7–7.8.

Ravindra Bagale's Tip

The mistake seen most often with types is letting automatic type detection run and never checking it. It looks only at the first rows, so a Pincode or Order ID can become a number and lose its leading zeros. Set types deliberately after cleaning, especially for IDs, phone numbers and money. Never forget this.

Fix common mistakes

Wrong result Reason Correction
06-04-2026 became 04-Jun-2026 Default locale (English US) reads month first Change Type › Using Locale › English (India)
Amount shows Error Changed type before removing ₹ and commas Delete the type step, clean text, then set type
PIN 411038 fine but codes like 0401 lose the zero Typed as number Keep codes as Text

Practise independently

Practice task

What date does 07-04-2026 become with the default US locale?

Hints
  • Month first.
Solution

04-Jul-2026 (wrong). With English (India) it is 07-Apr-2026.

Think like a professional

Dates silently wrong are worse than errors. Always check a few dates where day ≤ 12 after any type change.

Ravi Sir's Cards for this lesson

मराठी cards