Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I'm working on a project to create a weather forecast based on 3 variables: temperature, cloud cover, type of rainfall.
I received external help to extract the weather data and apply it to the historical data based on the city name -> "Historique" table (Ville).
There is then a "Prévisionnel" table which extracts the weather for the next 15 days from visualcrossing and arranges it by date, week and town name.
Would it be possible to merge these two tables and get the sales quantity (QuantiteTotalHebdo) per "Code Client" and "Reference Article"?
The table would run over the two weeks of the weather forecast with an average of the quantity sold in the "historique" table.
To search the quantity, I thought of selecting for each criterion with a margin of 20%. For example, the average temperature is 20°C in week number 15. We search for each year and the customer quantity sold in the same week. If the temperature is the same +/- 20%, we take it. If the conditions are met over 3 years, it would be an average of the quantity. Same goes for cloud cover and rain type.
The summary table would look like this:
Date | SemainePrevisions | Ville | référence article | code client | temp_moyenne (°C) | couverture_nuageuse (%) | type_precipitation | Qte temp | Qte couv | Qte type |
26-août-24 | 35 | BRUGUIERES | 1005 | G107 | 21,7 | 83 | rain | 5 | 0 | 7 |
26-août-24 | 35 | CHAVANOD | 915 | T595 | 17,6 | 75 | rain | 4 | 3 | 6 |
I first tried to do this with the DAX, but it didn't seem practical.
With this table, it's possible to create a chart of the predicted sales on the filtered variable.
Bellow the link to the pbix file :
link
Many thanks
What benefits are you expecting from merging the tables? Is that something that could be done better in the data model.
Hi @lbendlin
Merging would help to link side tables such as a customer base and an item base and then show the result from different angles. Someone helped build the data model, but we can't work together. My knowledge of Python is too short to rebuild the model. The aim was to use the existing data.
Kind regards
I would recommend to spend some time learning how to create and manage data models.
This project is linked to a larger project where the data model is already established and running. It was an opportunity to extend the existing model by adding a weather forecast table.
The only solution would be to create a different modele using python ?
You don't create models using Python. With Python you can prepare tabular data (like your forecast) that can then be added (joined/linked) to the existing data model.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
25 | |
12 | |
11 | |
11 | |
8 |