cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Tomek1982
Helper I
Helper I

Stock value calculation over time

Hi,

I have following issue. 

There is a stock calculated over time based on a table with stock movement.

Tomek1982_0-1665948423764.png

There is a measure calculating the stock and this is working fine:

Tomek1982_1-1665948557770.png

The next step for me is to calculate stock value over time taking parts prices from another table:

Tomek1982_2-1665948777559.png

It seems to be easy calculation: stock_value = parts_qty * part_price but I can not manage it. I would like to display changes over time. PBIX attached here

1 ACCEPTED SOLUTION

Thanks for the reply, actually in the original file the issue was much simpler. There was a mess in data types. After data types correction everything sarted to work as intended.

View solution in original post

4 REPLIES 4
Shaurya
Memorable Member
Memorable Member

Hi @Tomek1982,

 

You can use the LOOKUPVALUE DAX function to pull in values of Part Price from the other table and then calculate Stock Value. Refer:

 

https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax

 

Works for you? Mark this post as a solution if it does!
Consider taking a look at my blog: Forecast Period - Previous Forecasts

Anonymous
Not applicable

I m not understanding in 100% but if you want to use 2 different tables in calculation, than you must create relationships between them.

 

In dax, use logical funtion to connect them. = related or relatedtable

 

lukaszEltwin1_0-1665951119637.png

 

Thanks for the reply, actually in the original file the issue was much simpler. There was a mess in data types. After data types correction everything sarted to work as intended.

Anonymous
Not applicable

Hi, 

How did you in the end make the calculation to get the stock value? 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors