Forum Discussion

mrothschild's avatar
mrothschild
Icon for Continued Contributor rankContinued Contributor
4 years ago

Create calculated column from a measure (using SELECTEDVALUE) and existing column data

Link to PBIX file: https://drive.google.com/open?id=1LKAvDaMCVBLLkhMiEU8wrsKpnOBLFVWD

 

I'm trying to create a calculated column for the table shown below which is equal to the product of column [B] and column [C].

[C] is the SELECTEDVALUE of a slicer.

 

 

The code I've tried, which is returning blank: 

Portfolio Contribution - S&P 500 = 
PRODUCTX('Returns - Cambridge and Indices',
    SUM('Returns - Cambridge and Indices'[S&P 500 Index]) * [Weight - Equities - Public - S&P500]
)

 

I've also tried even simpler:

Portfolio Contribution - S&P 500 = 
    SUM('Returns - Cambridge and Indices'[S&P 500 Index]) * [Weight - Equities - Public - S&P500]

 

But keep coming up with BLANK() column data. 

 

Separately, if you're in the PBIX file and have an idea on how I can limit the "Less Than" slicer titled "Public Equities" to a maximum value of the SELECTEDVALUE from its parent slicer titled "Total Equities", I'd be extremely grateful!

 

Thanks in advance!!

 

 

2 Replies