Power Query Output Table Date Formatting Inconsistency - excel

I have a Power Query which collects data from a .txt file and after some transforming I output it onto worksheet.
All formatting is done well and it always worked well until recently, when I noticed that the formatting of dates is correct only until certain row and then it continues as general (where it shows the number of days that passed since 01/01/1900). Please refer to the snippet below.
Do you know what could be the reason? I don't load this particular query to Data Model (it sometimes causes some weird behavior of the table, like sorting issues).

Related

Referencing a cell in a query transformation to create a reverse running total

I have been working on this for several days now and am having no luck in figuring it out, but feel like I am very close.
In Excel, I am trying to create a reverse running total for a budget by referencing a cell which can be modified or updated.
The only way I have been able to make this work so far is by hard-wiring the starting amount in manually. this is what I want, except every time we receive money I have to change the starting amount manually again.
= Excel.CurrentWorkbook(){[Name="Q4Rec"]}[Content][QT4_Received]{0}
I used this to break down one of my input tables into queries that result in singular numeric values. (The table sums all of the revenue received into annual and quarter) How do I how to reference the new single-quantity queries in my previously built queries to conduct the transformation. I keep getting null values.

Remove Duplicates based on latest date in power query

I got a dataset that I am loading into my sheet via power query and wish to transform the data a little bit according to my liking before loading it in.
To give a little more context, I have some ID's and I would like the older rows to be removed and the rows which have the newer date to be loaded in.
Solution is described at https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/
"Remove Duplicates and Keep the Last Record with Power Query"
In short, sort per date in a buffered table and then remove duplicate id
Another way I think would be to group by id and get MAX date but it depends of the data size

Excel Query to update a Worksheet doesnt keep formats

im trying to update a worksheet, by using queries. Now i have a problem, cause the imported Data keeps getting turned into a table , although the resource Data is not a table.
Basically i want the columns A:E in worksheet(x), to get updated with columns A:E from worksheet(xyz) and keep the formatting from worksheet(xyz).
Power Query always returns output in the form of table as it's easier to address the respective data positions via vectors. assume you have 2 queries, then it's much easier to merge/append since they are treated as relational data tables.
you can always convert the output table back to range but the connection to query will be lost.

Access query returns a different result when read from Excel

I have a query in an ACCDB that works fine in Access.
I can successfully copy/paste its data to Excel.
However, from Excel, if I try to insert a Pivot Table using External Data Source, pointing to the very same query, then some numeric fields have weird formatting and some calculated numeric columns (formula in the query) have their value divided by 100 compared to the source.
Never seen that behaviour. Any suggestion ?
The whole MS-Office setup is in 2010.
What I have already done in the source query (without visible improvement):
used CCur() to make sure the figures are in a coherent data type
set the Format property of those culprit columns to "Standard"
The behaviour is exactly the same on other PCs in the same bank.
I could solve the problem which was due to 2 different bugs, probably in JetOLEDB.
Like is not handled properly by Excel
The query contained some formulae using Like:
iif(someField Like "XX*";0;anotherField).
Changing this to iif(Left(somefield;2) = "XX";0;anotherField) solved calculation differences between Excel but and Access.
Reference to another calculated column is handled differently
Say you have 2 query columns:
Rate: i.Rate *100 (i is a table alias)
Amount: Rate*Price
Access calculates Amount using the Rate calculated column, while Excel uses the Rate field from table i.Therefore I had to change the Amount expression to:
Rate: i.Rate *100
Amount: i.Rate *100*Price
since Excel does not seem to make always use Rate from the table (i.Rate).
Use the query in Access to first Make Table in Access then import the table to excel.

How to replicate attribute data for all lines in GoodData table report?

I'm working on a table report where the client needs all lines fulfilled with data, with no blank spaces.
We need the Date information, for example, to be repeated for each metric line. And so the Number, Week Day, and Store.
This can be made?
The grouping of attribute values happens automatically and it is there to make reports easy to read. There is not a functionality to repeat attributes values in reports. So, it cannot be made in the report.
Attribute values are repeated, if report is exported to CSV file.
You can try to redesign the report to avoid the grouping.

Resources