Request from power query does not display the right data

Eraaz

New Member
Joined
Apr 18, 2018
Messages
15
Hello, I have some request in my excel sheet that are loaded every day by a macro.
The problem is the data that are recovered are not the same as the data that are on the preview of the power query request.
The difference is always on the hour.
Do you have an idea why ?
Thanks
1682582140472.png
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Thanks for the reply.
I don't think it's region related. Because if I reload more the correct time is display.

The code to display the time is this.
Power Query:
let
    Source = PertesDataconnexion,
    #"Autres colonnes supprimées" = Table.SelectColumns(Source,{"Column53"}),
    #"Premières lignes supprimées" = Table.Skip(#"Autres colonnes supprimées",3),
    #"Lignes vides supprimées" = Table.SelectRows(#"Premières lignes supprimées", each not List.IsEmpty(List.RemoveMatchingItems(Record.FieldValues(_), {"", null}))),
    #"Ajout 1 jour" = Table.AddColumn(#"Lignes vides supprimées", "Date ini", each Date.AddDays([Column53],1)),
    #"Colonnes supprimées1" = Table.RemoveColumns(#"Ajout 1 jour",{"Column53"}),
    #"Personnalisée ajoutée" = Table.AddColumn(#"Colonnes supprimées1", "Heure diff", each Duration.Hours(
    DateTime.Time(DateTime.LocalNow())-
    DateTime.Time(DateTimeZone.UtcNow()))),
    #"Personnalisée ajoutée1" = Table.AddColumn(#"Personnalisée ajoutée", "Date", each if [Heure diff] = 1
        then Date.ToText([#"Date ini"], "yyyy-MM-dd"&"T08:00:00Z")
        else Date.ToText([#"Date ini"], "yyyy-MM-dd"&"T07:00:00Z")),
    #"Colonnes supprimées" = Table.RemoveColumns(#"Personnalisée ajoutée1",{"Heure diff"}),
    #"Index ajouté" = Table.AddIndexColumn(#"Colonnes supprimées", "Index", 0, 1, Int64.Type),
    #"Autres colonnes supprimées1" = Table.SelectColumns(#"Index ajouté",{"Date", "Index"})
in
    #"Autres colonnes supprimées1"
 
Upvote 0

Forum statistics

Threads
1,215,335
Messages
6,124,327
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top