Forum Discussion
problem while multiplying column by measure (doesn't work)
- 5 years ago
I think I might have figured it out
the problem that I had seemed to be because I was mixing the facts (hardcoded data in columns) with the measures in a one measure, in which case the measure tend to have a single value (like with VAR statement)
I fixed it with turning the facts into measures with
( CALCULATE ( SUMX ( table, column_that_i_needed_elsewhere_as_measure), FILTER( calendar_table, calendar_table[date] = MAX(calendar_table[date]) ) ) )and it seems to work as intended
Why does the investments.csv file have just one row? I'd like to see some more... a (small) portfolio of stocks. It would also be useful if you could make some manual calculation(s) for some selection of parameters to exactly show what you're after. I'll try to figure out from your descriptions but I'd like to see some good example.
Another problem is that the Stock Splits column has only 0's in it. I need data that's representative of the problem. This means I have to have actual splits in there.
Thanks.
it does have a split in it (row 474) and the single stock is representative enough
when it comes to the project - I scrambled it and started from scratch, decided to move on with the continous data for the portfolio (so I created a detailed data of how much the investor had at any given day from the day of purchase), due to the conflicting nature of splits and dividends I believe it cannot be done and unified with the way I described in the OP (it would be possible if there were no splits ever)
still the question remains
how do you access the value of the measure in another measure in a given (changing context)?
the data and measures I've included are the same I've used in the first post and allows to recreate the problem exactly