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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.