Forum Discussion
Retrieve data from multiple files present in file path with the logic of loading data
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Below is sample data for Retrieve data from multiple files present in file path with the logic of loading current week prices from last week last working day file generation.
| FileName | Date | Price |
| Price_03-03-2023 | 3-Mar-23 | 710 |
| Price_03-03-2023 | 4-Mar-23 | 720 |
| Price_03-03-2023 | 5-Mar-23 | 730 |
| Price_03-03-2023 | 6-Mar-23 | 740 |
| Price_03-03-2023 | 7-Mar-23 | 750 |
| Price_03-03-2023 | 8-Mar-23 | 760 |
| Price_03-03-2023 | 9-Mar-23 | 770 |
| Price_03-03-2023 | 10-Mar-23 | 780 |
| Price_03-03-2023 | 11-Mar-23 | 790 |
| Price_03-03-2023 | 12-Mar-23 | 800 |
| Price_03-03-2023 | 13-Mar-23 | 810 |
| Price_03-03-2023 | 14-Mar-23 | 820 |
| Price_03-03-2023 | 15-Mar-23 | 830 |
| Price_03-03-2023 | 16-Mar-23 | 840 |
| Price_03-03-2023 | 17-Mar-23 | 850 |
| Price_03-03-2023 | 18-Mar-23 | 860 |
| Price_03-03-2023 | 19-Mar-23 | 870 |
| Price_03-03-2023 | 20-Mar-23 | 880 |
| Price_03-03-2023 | 21-Mar-23 | 890 |
| Price_03-03-2023 | 22-Mar-23 | 900 |
| Price_03-03-2023 | 23-Mar-23 | 910 |
| Price_03-03-2023 | 24-Mar-23 | 920 |
| Price_03-03-2023 | 25-Mar-23 | 930 |
| Price_03-03-2023 | 26-Mar-23 | 940 |
| Price_03-03-2023 | 27-Mar-23 | 950 |
| Price_03-03-2023 | 28-Mar-23 | 960 |
| Price_03-03-2023 | 29-Mar-23 | 970 |
| Price_03-03-2023 | 30-Mar-23 | 980 |
| Price_03-03-2023 | 31-Mar-23 | 990 |
| Price_04-03-2023 | 4-Mar-23 | 1000 |
| Price_04-03-2023 | 5-Mar-23 | 1010 |
| Price_04-03-2023 | 6-Mar-23 | 1020 |
| Price_04-03-2023 | 7-Mar-23 | 1030 |
| Price_04-03-2023 | 8-Mar-23 | 1040 |
| Price_04-03-2023 | 9-Mar-23 | 1050 |
| Price_04-03-2023 | 10-Mar-23 | 1060 |
| Price_04-03-2023 | 11-Mar-23 | 1070 |
| Price_04-03-2023 | 12-Mar-23 | 1080 |
| Price_04-03-2023 | 13-Mar-23 | 1090 |
| Price_04-03-2023 | 14-Mar-23 | 1100 |
| Price_04-03-2023 | 15-Mar-23 | 1110 |
| Price_04-03-2023 | 16-Mar-23 | 1120 |
| Price_04-03-2023 | 17-Mar-23 | 1130 |
| Price_04-03-2023 | 18-Mar-23 | 1140 |
| Price_04-03-2023 | 19-Mar-23 | 1150 |
| Price_04-03-2023 | 20-Mar-23 | 1160 |
| Price_04-03-2023 | 21-Mar-23 | 1170 |
| Price_04-03-2023 | 22-Mar-23 | 1180 |
| Price_04-03-2023 | 23-Mar-23 | 1190 |
| Price_04-03-2023 | 24-Mar-23 | 1200 |
| Price_04-03-2023 | 25-Mar-23 | 1210 |
| Price_04-03-2023 | 26-Mar-23 | 1220 |
| Price_04-03-2023 | 27-Mar-23 | 1230 |
| Price_04-03-2023 | 28-Mar-23 | 1240 |
| Price_04-03-2023 | 29-Mar-23 | 1250 |
| Price_04-03-2023 | 30-Mar-23 | 1260 |
| Price_04-03-2023 | 31-Mar-23 | 1270 |
| Price_05-03-2023 | 5-Mar-23 | 1280 |
| Price_05-03-2023 | 6-Mar-23 | 1290 |
| Price_05-03-2023 | 7-Mar-23 | 1300 |
| Price_05-03-2023 | 8-Mar-23 | 1310 |
| Price_05-03-2023 | 9-Mar-23 | 1320 |
| Price_05-03-2023 | 10-Mar-23 | 1330 |
| Price_05-03-2023 | 11-Mar-23 | 1340 |
| Price_05-03-2023 | 12-Mar-23 | 1350 |
| Price_05-03-2023 | 13-Mar-23 | 1360 |
| Price_05-03-2023 | 14-Mar-23 | 1370 |
| Price_05-03-2023 | 15-Mar-23 | 1380 |
| Price_05-03-2023 | 16-Mar-23 | 1390 |
| Price_05-03-2023 | 17-Mar-23 | 1400 |
| Price_05-03-2023 | 18-Mar-23 | 1410 |
| Price_05-03-2023 | 19-Mar-23 | 1420 |
| Price_05-03-2023 | 20-Mar-23 | 1430 |
| Price_05-03-2023 | 21-Mar-23 | 1440 |
| Price_05-03-2023 | 22-Mar-23 | 1450 |
| Price_05-03-2023 | 23-Mar-23 | 1460 |
| Price_05-03-2023 | 24-Mar-23 | 1470 |
| Price_05-03-2023 | 25-Mar-23 | 1480 |
| Price_05-03-2023 | 26-Mar-23 | 1490 |
| Price_05-03-2023 | 27-Mar-23 | 1500 |
| Price_05-03-2023 | 28-Mar-23 | 1510 |
| Price_05-03-2023 | 29-Mar-23 | 1520 |
| Price_05-03-2023 | 30-Mar-23 | 1530 |
| Price_05-03-2023 | 31-Mar-23 | 1540 |
Note: 1. Each file has forward prices till year end. I have given example till month end.
2. Week always starts from Sunday & Ends with Monday
Output for Week9:
| Output for Week9 should be: | |
| 5-Mar-23 | 730 |
| 6-Mar-23 | 740 |
| 7-Mar-23 | 750 |
| 8-Mar-23 | 760 |
| 9-Mar-23 | 770 |
| 10-Mar-23 | 780 |
| 11-Mar-23 | 790 |
In the above examle I have selected Week9(5-Mar-2023 to 11-Mar-2023). Prices for Week9 did fetch from Previous week(Week8) Last working day file(3-Mar-2023).
- lbendlin3 years ago
Super User
Please define "working day" - is that Monday through Friday?
Your sample data only applies to the weekly scenario, right?