Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi guys,
I understand that my question has been asked 1000 times and I tried to apply some of the proposed solutions to my problem, but I guess I am just too stupid....
My basic data model:
Table "Share Price" contains share price information on a daily basis:
Table "Portfolio" contains the information of my portfolio:
My problem now is, that the column total is wrong for "Current Value" and "Current Stock Price":
I tried many different things, so far no luck. Here is my DAX for "Current Value"
Current Value =
var Stock_Price = CALCULATE (
CALCULATE (
MAX ('Share Price'[fxYahoo.Close] ),
FILTER (
'Share Price',
'Share Price'[fxYahoo.Date]
= CALCULATE (
MAX ('Share Price'[fxYahoo.Date]),
ALLEXCEPT ('Share Price','Share Price'[Symbol] )
)
)
)
)
var _value = SUM('Portfolio'[#Shares]) * Stock_Price
return
SUMX(Portfolio,if(Portfolio[Paid Price]>0,_value))
I am sure there is an easy fix to this, but I can't figure it out. Could you please lend me a hand?
Solved! Go to Solution.
Rename your existing Current Value measure to Current Value ( individual ) then create a new measure
Current Value = IF( ISINSCOPE( Portfolio[Symbol] ), [Current Value ( individual )],
SUMX( ADDCOLUMNS( SUMMARIZE( Portfolio, Portfolio[Symbol]),
"@value", CALCULATE( [Current Value ( individual )] ) ),
[@value]
) )
Not sure what summarization you want for the current stock price, but you could replace the SUMX with AVERAGEX or whatever you need
Rename your existing Current Value measure to Current Value ( individual ) then create a new measure
Current Value = IF( ISINSCOPE( Portfolio[Symbol] ), [Current Value ( individual )],
SUMX( ADDCOLUMNS( SUMMARIZE( Portfolio, Portfolio[Symbol]),
"@value", CALCULATE( [Current Value ( individual )] ) ),
[@value]
) )
Not sure what summarization you want for the current stock price, but you could replace the SUMX with AVERAGEX or whatever you need
Dear @johnt75
Great, that worked. Thank you very much!!
For the "current Stock Price" I didn't want to have a total at all...
May I ask to elaborate a bit why this is working or please point me where I can get a better understanding?
User | Count |
---|---|
13 | |
8 | |
8 | |
7 | |
5 |
User | Count |
---|---|
23 | |
15 | |
15 | |
10 | |
7 |