Forum Discussion
How to proper design a weekly report
- 10 years ago
Yes, I have tested it, if the data on the file is
111 a 3 20
222 b 3 40
222 e 3 40
333 c 5 70
444 f 10 100Then you will not get the row after refersh.
222 b 6 80Regards,
Charlie Liao
sorry ... early click...
Thank you very much for your reply.
Pheraps I am a bit confusing. Up to now I have made reports where the total number of rows always increases.
In this case each week I get a sort of "picture" take in that moment.
My doubt is the following. Let us suppose that in th week 1 we have:
Material Project qty value
111 a 3 20
222 b 6 80
333 c 5 70
Then in the week 2 we have:
Material Project qty value
111 a 3 20
222 b 3 40
222 e 3 40
333 c 5 70
444 f 10 100
The row 444 wil be added since it is new. Same happen for row 222 e.
Row 222 b should be refreshed too. But what about the original row:
222 b 6 80
will be canceled from the model?
This is the point not clear to me.
As long as the data exists in your new file it should exist in the query.
It is also possible to add multiple csv files and have the query append the new ones. See here for that: http://www.dutchdatadude.com/combining-text-csv-files-using-power-query-for-excel/
- gpiero10 years ago
Skilled Sharer
Really I would not append anything neither in the week 2 nor in the weeks 3,4,5,.....
I fear that the row below
222 b 6 80 (week 1)
remain in the model data although has been split in two rows
222 b 3 40
222 e 3 40
If this happen the stock value for material 222 woud be 12.
222 b 6 80 (week 1)
222 b 3 40 (week 2)
222 e 3 40 (week 2)
And it is wrong since it should be 6
This is why I would eliminate existing rows each time before refreshing data.
I hope I have been clear.
- v-caliao-msft10 years ago
Microsoft Employee
Hi gpiero,
For week2, what's the data looks like in your new file?
Material Project qty value
111 a 3 20
222 b 3 40
222 e 3 40
333 c 5 70
444 f 10 100
OR
Material Project qty value
111 a 3 20
222 b 6 80
333 c 5 70
111 a 3 20
222 b 3 40
222 e 3 40
333 c 5 70
444 f 10 100
If the data in new file looks like the former, then you just need to refreshe the data. If the data looks like the latter, could you please give the expected result, so that we can make further analysis.
Regards,
Charlie Liao
- gpiero10 years ago
Skilled Sharer
Many thanks for your clarification.
I confirm that the new file will contain data in the following form
111 a 3 20
222 b 3 40
222 e 3 40
333 c 5 70
444 f 10 100
Then I assume the refresh is the solution because the data model will containg nomore the row below
222 b 6 80
Is this understanding correct?
Regard