Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
santigc97
Frequent Visitor

PROJECTION of an stock in POWERBI

Hello,

 

I have a tool that provides me with this data (actual stock and inflow and outflow for a specific date and location) and I usually create a report in Excel using a simple formula.

It is called projection, for the first date is equal to the Stock OH and for the next dates it is the previous projection + Inflow – Outflow and this to the infinite…

 

Product*LOCOHType23/04/202429/04/202406/05/202413/05/2024
ASPAIN20OUTFLOW515205
ASPAIN20INFLOW010000
ASPAIN20PROJECTION201510080
AGERMANY10OUTFLOW10101010
AGERMANY10INFLOW0000
AGERMANY10PROJECTION100-10-20
    =OH=PROJ(0)+OUTFLOW(0)+INFLOW(0)=PROJ(1)+OUTFLOW(1)+INFLOW(1)=PROJ(2)+OUTFLOW(2)+INFLOW(2)

 

Now I have access to the database and I am able to download the information that is similar to the following table, as it has the data I tried to create a new column that is cero by default for modify it later, them an unpivot and outside the data model formular but I always have circular references. How can I manipulate the data to have the columns with an unpivot for introducing them in a matrix?

DateITEM*LOCOUTFLOWINFLOWOH (First OH)
23/04/2024ASPAIN5020
29/04/2024ASPAIN1510020
06/05/2024ASPAIN20020
13/05/2024ASPAIN5020
23/04/2024AGERMANY10010
29/04/2024AGERMANY10010
06/05/2024AGERMANY10010
13/05/2024AGERMANY10010

 

 

 

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @santigc97 ,

 

Here are the steps you can follow:

1. Select [OUTFLOW], [INFLOW],[OH] – Transform – Unpiovt Column.

vyangliumsft_0-1714024710163.png

vyangliumsft_1-1714024710165.png

2. Placement of fields in the matrix.

vyangliumsft_2-1714024725489.png

Row headers -- +/-icons set off – Stepped layout set off.

vyangliumsft_3-1714024725489.png

vyangliumsft_4-1714024734457.png

3. Result:

vyangliumsft_5-1714024741685.png

It's not clear how the blank values below are calculated, since 2024.4.23 doesn't show any data on Germany.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hello,

 

The problem is that in your solution we don't have the projection part which is the most important, only the OH will be om in the 23/04. In the other is the calculation

=PROJ(0)+OUTFLOW(0)+INFLOW(0)
On which the data is the one of the last day

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.