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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lreinhard77
Frequent Visitor

Calculation inventory values

Hi, 

I want to calculate inventory values as exemplified in the following screenprint. 
My problem is related to the issue price calculation for which I need the **bleep** value and **bleep** qty from the previous row. 
I already tried many things but always get a circular dependency message. 
Does anyone has a tip how to fix this issue and can help me with the correct formula for the issue price calculation?

lreinhard77_0-1682364456893.png

 

4 REPLIES 4
v-rongtiep-msft
Community Support
Community Support

Hi @lreinhard77 ,

I have created a simple sample, please refer to my pbix file.

Create a measure.

Measure = 

CALCULATE(SUM('Table'[qTY]),FILTER(ALL('Table'),'Table'[date]<=SELECTEDVALUE('Table'[date])&&'Table'[Item]=SELECTEDVALUE('Table'[Item])))

vrongtiepmsft_2-1682474087745.png

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

Hello, 

I tried to make things more clear and prepared some data in Excel. 
In short: 
I get some data from an accounting system (yellow colored section). 
For those data, I want to calculate (a) the issue price because I need it to ultimately calculate (b) the inventory value. 
The inventory value is illustrated in the last column. 

lreinhard77_0-1682486440328.png

My problem is that the sales price and sales value (qty * sales price) influences the subsequent sales price calculations. 
As an example, the sales price in line 4 is influenced by the sales price (times the sales quantity) in line 2
Unfortunately, I don't know the correct way how to make this calculation in PowerBI. 

I already tried many things but always get a circularity error 😞






Hi @lreinhard77 ,

Sorry, I'm not smart. Are you trying to calculate the sales pricez column? If according to you 427.5=(0+17100)/40, which column does 40 represent?Cumcurrenh or CurrentBuy?Why is the third column 0?(0-2137.5)/40=53.4375 and how do you get the 55 in (0+17100-2137.5+0+0+0+8100)/55? And why does this result appear in the fourth and fifth row? What is the logic of the calculation?

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

Hi, 

I tried to make things more clear with the following illustrations.

lreinhard77_0-1682490172482.pnglreinhard77_1-1682490261528.pnglreinhard77_2-1682490324900.png

lreinhard77_3-1682490357702.png

I am not sure if I can attach you my Excel file here. 
Hope those screenprints make things clear. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors