The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I have two datasets - Inventory and Sales
Need to produce raport for inventory and sales for the same period ( sales period)
The problem is how to make union of data ( period of time) from both datasets
Printscreen can explain
Inventory | Sales | Report Inventory | Report Sales | |||||||||||||||||||||
Date | Product | Inventory | Date | Product | Sales | Inventory | 1.10.2023 | 2.10.2023 | Average Inventory | Sales | 1.10.2023 | 2.10.2023 | Total sales | Average Sales | ||||||||||
| 31.12.2022 | A | 10 | 1.10.2023 | A | 5 | A |
| 20 | 15 | A |
| 20 | 25 | 12,5 | |||||||||
1.10.2023 | A | 20 | 2.10.2023 | A | 20 | B | 20 | 30 | 25 | B | 5 | 5 | 10 | 5 | ||||||||||
2.10.2023 | A | 20 | 1.10.2023 | B | 5 | C | 30 | 40 | 35 | |||||||||||||||
| 3.10.2023 | A | 30 | 2.10.2023 | B | 5 | ||||||||||||||||||
1.10.2023 | B | 20 | The question is | |||||||||||||||||||||
2.10.2023 | B | 30 | how to find same period (first date and last date from sales) for calculation (report) | |||||||||||||||||||||
| 3.10.2023 | B | 40 |
| on both dataset ( Inventory and sales), and | |||||||||||||||||||
1.10.2023 | C | 30 | not to forget product C in inventory even it is not founded on sales | |||||||||||||||||||||
2.10.2023 | C | 40 | First date of sales | 1.1.2023. | ||||||||||||||||||||
| 3.10.2023 | C | 50 | Last date of sales | 2.1.2023. | |||||||||||||||||||
First date of Inventory | 31.12.2022. | |||||||||||||||||||||||
Lat Date of inventory | 1.3.2023. |
Tere is alway someone that already know the knowledge -
Solved! Go to Solution.
Hi,
Please find attached the PBi file.
Hi @gvlado,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Great simple solution - thanks a lot
I always learn something
Hello @gvlado ,
try to make a dim date table that is based on the sales date column and link it to both tables and see values through this date table.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡
Proud to be a Super User! | |
User | Count |
---|---|
79 | |
74 | |
42 | |
30 | |
28 |
User | Count |
---|---|
108 | |
96 | |
53 | |
48 | |
47 |