March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello All,
Currently I am having this view in Power BI
Sales document | Material | Ordered Quantity | Stock.Available Quantity | Remaining Stock |
2744570 | 105980 | 56 | 15331 | 15275 |
2793574 | 105980 | 56 | 15331 | 15275 |
2744571 | 105980 | 56 | 15331 | 15275 |
2793575 | 105980 | 56 | 15331 | 15275 |
But I want to have this view
Sales document | Material | Ordered Quantity | Stock.Available Quantity | Remaining Stock |
2744570 | 105980 | 56 | 15331 | 15275 |
2793574 | 105980 | 56 | 15275 | 15219 |
2744571 | 105980 | 56 | 15219 | 15163 |
2793575 | 105980 | 56 | 15163 | 15107 |
How can I do it and also i have many materials so for every material I have to do it.
I will give an example of the different materials i have
Sales document | Material | Ordered Quantity | Stock.Available Quantity |
2744570 | 105980 | 56 | 15331 |
2793574 | 105980 | 56 | 15331 |
2744571 | 105980 | 56 | 15331 |
2793575 | 105980 | 56 | 15331 |
2787998 | 1056446 | 1 | 3 |
2792122 | 1056446 | 1 | 3 |
2793918 | 1056446 | 1 | 3 |
2786859 | 522227 | 2 | 4548 |
2786860 | 522227 | 2 | 4548 |
2786861 | 522227 | 2 | 4548 |
2784586 | 726326 | 14 | 109 |
2793211 | 555153 | 1 | 186 |
2796889 | 555153 | 1 | 186 |
2796871 | 555153 | 1 | 186 |
2796492 | 555153 | 1 | 186 |
2796580 | 555153 | 1 | 186 |
2796918 | 555153 | 1 | 186 |
2796890 | 555153 | 1 | 186 |
Please help me with this.
BR
Yashh Gaikwad
Solved! Go to Solution.
pls try to create an index column and create two calculated columns
stock available =
VAR _index = CALCULATE(min([Index]),ALLEXCEPT('Table','Table'[Material]))
return [Stock.Available Quantity]-sumx(FILTER('Table','Table'[Material]=EARLIER('Table'[Material])&&[Index]<=EARLIER('Table'[Index])&&'Table'[Index]>_index),'Table'[Ordered Quantity])
remaining stock = [Stock.Available Quantity]-sumx(FILTER('Table','Table'[Material]=EARLIER('Table'[Material])&&[Index]<=EARLIER('Table'[Index])),'Table'[Ordered Quantity])
Proud to be a Super User!
pls try to create an index column and create two calculated columns
stock available =
VAR _index = CALCULATE(min([Index]),ALLEXCEPT('Table','Table'[Material]))
return [Stock.Available Quantity]-sumx(FILTER('Table','Table'[Material]=EARLIER('Table'[Material])&&[Index]<=EARLIER('Table'[Index])&&'Table'[Index]>_index),'Table'[Ordered Quantity])
remaining stock = [Stock.Available Quantity]-sumx(FILTER('Table','Table'[Material]=EARLIER('Table'[Material])&&[Index]<=EARLIER('Table'[Index])),'Table'[Ordered Quantity])
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |