Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
krishna_murthy
Advocate I
Advocate I

how to convert date time UTC to IST format in powerbi

I have an more than 20 tables. which is connected semantic model from SQL to Powerbi, while getting the data into powerbi Data is came like in UST format. due to that data count is mismatch from IST count. So i want to know how to convert/change the data powerbi with match the count in IST values and look for any fesiable options like Power query & DAX or any other way.
. Please suggest further.

15 REPLIES 15
V-yubandi-msft
Community Support
Community Support

Hi @krishna_murthy ,
Could you let me know if your issue has been resolved or if you still need any more information? If you need further help, please let us know.

V-yubandi-msft
Community Support
Community Support

Hi @krishna_murthy ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we provided for your issue worked for you  or let us know if you need any further assistance.

V-yubandi-msft
Community Support
Community Support

Hi @krishna_murthy ,

Thank you for contacting the Fabric Community. Could you review the snapshot below and confirm if this matches your expectations? We have used the IST conversion logic to adjust the timestamps, so the output should now show the correct daily grouping.
FYI:

Vyubandimsft_0-1759154391488.png

 

 

Please let us know if this addresses your concern or if you need any further changes.

 

Thank you.

@V-yubandi-msft >>>

After added the condtion getting below error , requesting please check and the needful .

krishna_murthy_0-1759500901382.png

 

Hi @krishna_murthy ,

Thank you for providing the details. This error usually indicates that Power Query cannot locate the step name  Added Custom. This often occurs due to a typo or a mismatch in the step name.

You can try the following steps.

1. Review the Applied Steps pane to ensure the previous step name matches exactly, including spaces and capitalization.
2. Update your formula to use the correct step name. For example

= Table.RenameColumns(#"Added Custom", {{"Custom", "IST"}})

If you are adding a new column

= Table.AddColumn(#"PreviousStepName", "IST", each [Custom])

Once the reference is correct, it should display the IST values as expected.

Please try these suggestions and let me know if the issue persists so we can review it together.

tayloramy
Community Champion
Community Champion

Hi @krishna_murthy 

 

-Best practice: convert UTC to IST as early as possible (ideally in SQL or Power Query) and then build your date columns from the IST value.
- For SQL Server: convert in the source using AT TIME ZONE.
- For Power Query (M): add a timezone, switch to IST, then remove the zone.
- DAX is OK for display, but it will not help DirectQuery and can lead to confusing group-bys; prefer SQL or Power Query for reliable totals.
Docs: AT TIME ZONE (T-SQL), DateTime.AddZone, DateTimeZone.SwitchZone, DateTimeZone functions, UTCNOW (DAX), DAX date/time functions.

 

1) Do it in SQL Server (recommended if you control the source)
Use AT TIME ZONE to translate UTC to IST and then derive your date keys from the IST column. IST has a fixed offset (+05:30) and no DST, so this is stable.

-- Example: convert UTC column to IST
SELECT
  t.EventUTC,
  -- Convert UTC -> IST
  (t.EventUTC AT TIME ZONE 'UTC') AT TIME ZONE 'India Standard Time' AS EventIST,
  -- Build date for grouping in IST
  CONVERT(date, ((t.EventUTC AT TIME ZONE 'UTC') AT TIME ZONE 'India Standard Time')) AS EventISTDate
FROM dbo.YourTable AS t;

Docs: AT TIME ZONE.

2) Do it in Power Query (M) in Power BI Desktop
If your column is plain datetime (no zone), first tag it as UTC, switch to IST, then remove the zone so the value is a normal datetime in IST. After that, create your date column from the IST value.

// Replace YourTable and UtcTime with your names
let
  Source = YourTable,
  // Treat existing datetime as UTC
  WithUtcZone = Table.TransformColumns(Source, {{"UtcTime", each DateTime.AddZone(_, 0), type datetimezone}}),
  // Switch to IST (UTC+5:30)
  ToIST = Table.TransformColumns(WithUtcZone, {{"UtcTime", each DateTimeZone.SwitchZone(_, 5, 30), type datetimezone}}),
  // Remove zone to get a plain datetime in IST
  IstDateTime = Table.TransformColumns(ToIST, {{"UtcTime", each DateTimeZone.RemoveZone(_), type datetime}}),
  // Optional: add a date column for grouping
  IstDate = Table.AddColumn(IstDateTime, "IstDate", each DateTime.Date([UtcTime]), type date)
in
  IstDate

 

Docs: DateTime.AddZone, DateTimeZone.SwitchZone, DateTimeZone functions.

3) DAX only (display or Import models; not ideal for grouping)
If you already imported data and must adjust in the model, create an IST column and then build your date from it. Note: this does not work in DirectQuery for calculated columns.

-- Add 5 hours 30 minutes to convert UTC to IST
IST DateTime = 'Table'[UtcTime] + TIME(5, 30, 0)

IST Date = DATE(
  YEAR('Table'[IST DateTime]),
  MONTH('Table'[IST DateTime]),
  DAY('Table'[IST DateTime])
)

 

Docs: DAX date/time functions, UTCNOW.

4) Notes and pitfalls
- Power BI Service uses UTC for NOW/TODAY variants; if you rely on those, be aware of the UTC behavior. See: UTCNOW and DAX date/time functions.
- For DirectQuery, prefer doing the conversion in SQL with AT TIME ZONE so grouping and filters reflect IST correctly.
- After converting, always derive your grouping columns (like Date) from the IST value, not the original UTC column.

 

If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.

raja1992
Resolver I
Resolver I

I ran into this same problem last month when I connected our SQL Server sales data to Power BI. All the order timestamps were in UTC, and when I tried to do daily sales counts, the numbers didn’t match what our business team in India was seeing (because they work in IST).

What worked for me was fixing it in Power Query. Example:

  • My column was OrderDateUTC = 2025-09-27 20:00:00 (UTC).

  • I added a custom column like this:

Table.AddColumn(
    #"Previous Step",
    "OrderDateIST",
    each DateTimeZone.SwitchZone([OrderDateUTC], 5.5)
)

 

  • This converted it to 2025-09-28 01:30:00 (IST), which matched exactly with our backend counts.

If you prefer DAX, you can also create a calculated column:

OrderDateIST = Sales[OrderDateUTC] + TIME(5,30,0)

 

But since I had 20+ tables, I found Power Query was cleaner because once I fixed it there, all measures and visuals automatically aligned with IST.

 

Small tip: if you have SQL access, you can also do this directly in SQL using:

 

SELECT OrderDate AT TIME ZONE 'UTC' AT TIME ZONE 'India Standard Time'

 

That way, Power BI always receives IST values.

In short, if you want consistent daily counts in IST, go with the Power Query solution.

Hi @raja1992 , i have tried your inputs but getting an error like below, seems direct query not working ,
Requesting please check and do the neeful

 

krishna_murthy_1-1759039214552.png

 

 

krishna_murthy
Advocate I
Advocate I

Hi Ahmed-Elfeel ,
See getting below error like this, requesting please check and do the needful

krishna_murthy_0-1758972554876.png

 

Hi @krishna_murthy,

 

Try to use DateTime.From instead of DateTime.Add:

Table.AddColumn("Proofered Column", "HwDateTime", each DateTime.From([order_items]) + #duration(0,5,30,0))

 

Or even Simpler:

Table.AddColumn("Proofered Column", "HwDateTime", each [order_items] + #duration(0,5,30,0))

 

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Hi i have used both the cased but still getting an error see below , seems direct query not suppported for the beow conditions 

krishna_murthy_0-1759038398382.png

 

Hi @krishna_murthy,

Direct Query mode doesn't support many Power Query transformations

So you can try these options:

1-Switch to Import Mode (Recommended)

  • Go to Power BI Desktop → Settings → Current File → DirectQuery
  • Switch your semantic model/tables to Import mode

  • Then use the Power Query method:

[order_time] + #duration(0,5,30,0)

2-DAX Calculated Column (For Direct Query)

  • In Data view, right-click your table → New column

  • Use this DAX formula:

HwDateTime = [order_time] + TIME(5,30,0)

3-SQL View (Best long-term solution)

  • Modify your SQL view to convert UTC to IST before data reaches Power BI:

SELECT DATEADD(MINUTE, 330, order_time) as order_time_IST
FROM your_table

I hope these approaches is useful....Please Use reply buttone next time to trace the problem 😅❤️

if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

@Ahmed-Elfeel ,

 

i have tried all the option except sql but getting below error , please refer the below screenshot for your references 

 

krishna_murthy_0-1759126925355.png

 

@Ahmed-Elfeel ....
i have tired DAX as create a calculated column
(OrderDateIST = outward_orders[order_time] + TIME(5,30,0) )   and added to the slicer to filter date but getting below error 

krishna_murthy_0-1759305834569.png

 

Requesting please check and do the neeful .

 

Ahmed-Elfeel
Resolver III
Resolver III

Hi @krishna_murthy,

 

You can use Power query (most efficient and sustainable method)

  • Go to Power Query Editor
  • Select your date/time column

  • Use this formula in a Custom Column

    (Replace YourColumnName with your actual column name)

DateTime.Add([YourColumnName], #duration(0, 5, 30, 0))
  • Change the new column's type to Date/Time

  • Replace the original column with this new one
  • Repeat for all key date columns in your 20 tables
if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.