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
Hello, i have two tables, one that has the stock of each product and the second has a cloumn that has the names of the products purchased. each row of this column contain one product purchased, so if i want to know how many toys i purchased i count how many rows has "Toys" in them.
I want to create a varialbe that will give me the available stock from each product (stock - purchased) when i select the product name from a dropdown menu (a filter of the prduct name)
what is the best way to create this please
Can you please share a sample excel/PBIx file for the data set and the expected result? Thanks!
Hello Khader,
I am attaching the example. the first sheet has the column of the purchases per day and the other sheet has the purchased stock per date.
I want to know how much stock left from each product by selecting the name of the item from a drop down menu, when selected it will tell me how much purchased and how much stock left.
many thanks,
Hi @shady_hamilton,
Maybe something mistake. We cannot see your sample data. Please upload your sample data and the desired output so that we could help further on it.
Best Regards,
Cherry
I believe you are trying to create the below tables. If so, how much quantity do you have in the purchase columns?
Hi Khader,
no, i have two tables, the first one will log the purchases per day/time.... the other one will log the stock we purchase, we top up the stock every now and then, so no specific amount or intervals. these are two seperate tables
i want to know at a certain time how much stock i still have from one item by calculating the sum of the purchases of one item and deducting it from the total of the stock for that item.
showing each item in one box in Power BI is easy, my issue is that i have a lot of items, so i want to have a dropdown filter, where i select the item and it will show me the remaining stock for that item.
Any help please?
Hi @shady_hamilton,
Do you want to create a dropdown list with values of Toy, pencil, book and pen?
If it is convenient, please share your desired output so that we could help further on it.
Best Regards,
Cherry
Hi V-Piga-msft
Yes correct, the filter will be Book, Pen, Pencil and Toy.
as for the results i want to know how much Books left in stock after all the purchases and stock top up, so if i select Book for example, it will tell me you have so and so left in your stock for books...
If that's the case, then you need to apply a countrows for the first sheet where you will be counting the purchases. Then, take the difference of the sum of stocks from the second sheet.
countrows is fine, I did that, my problem is the formula where you change that every time you change the filter, so when i select books in the filter the box showing the available stock should show me the books stock, if i select pens then the box should show me the Pens stock and so on...
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 |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |