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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Sonyat810
Helper I
Helper I

Power BI will not take time from power apps and my excel sheet only shows dates currently.

I am using power apps to update my report in power bi, but it keeps giving me the time and wont update the report with this. How can I get around this

1 ACCEPTED SOLUTION

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtY3MtI3MjAyUjA0sjIwACIFR1+l2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type datetime}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Changed Type",{{"Column1", type date}})
in
    #"Changed Type1"

How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".

View solution in original post

16 REPLIES 16
lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

I have an excel sheet that feeds power bi, my manager wants power apps as a user interface to enter data into the excel sheet, but its entring hours and minutes and power bi dont seem to take that

Sonyat810_0-1662980060262.png

 

How can I allow or prevent Date and hours to be included and updated in my report. The current report have all time as 12:00 am but only updates the datein Power bi, once I added power apps it updates my excel sheet that feeds piwer bi with a date and time. Power Bi isn;t updating the data

Hi Sonya,

@Sonyat810 ,

 

From what I could get from your posts you may have a step called Changed Type in your query, which may contain something like this code:

= Table.TransformColumnTypes(PreviousStep,{{"DateTimeField", type date}})

This truncates your datetime data to date only. Try changing it to something like this (i.e. datetime instead of date😞

= Table.TransformColumnTypes(PreviousStep,{{"DateTimeField", type datetime}})

 and see if this helps.

 

Cheers,

John

This is whatI have

 

Sonyat810_0-1663064265852.png

 

Now add a new step that transforms the [Date]  column to type date.  Make sure to add a new step, not replace the existing step.

Can you walk me through this?

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtY3MtI3MjAyUjA0sjIwACIFR1+l2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type datetime}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Changed Type",{{"Column1", type date}})
in
    #"Changed Type1"

How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".

I'm sorry. I'm trying to understand what you are asking me to do. Do I do this on Add Column or Transform tab. This is what I currently have, but when a new record is recorded it has the time and wont update.

Sonyat810_0-1663090317396.png

 

So add a new column with [Date]?

Not required - add another data type change step to the existing column.

In Power Query you can accept the source data as datetime and then convert the column to date format.

I changed my source date to time, but only the ones you see with 00 time gets updated in power BI 

Sonyat810_0-1663087982029.png

 

Please change to Date, not to DateTime.

How would I do this?

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Top Solution Authors
Top Kudoed Authors