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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Anonymous
Not applicable

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 😞






Anonymous
Not applicable

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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