Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!!
Hi @mrothschild ,
This seems to be because of this error message. The calculation table cannot generate data due to insufficient memory. The column data used in selectvalue() is empty, which results in Blank().
After that, you can change its calculation column to measure to respond to the slicer:
Measure =
PRODUCTX('Returns - Cambridge and Indices',
SUM('Returns - Cambridge and Indices'[S&P 500 Index]) * [Weight - Equities - Public - S&P500]
)
This is the related document, you can view this content:
https://www.reddit.com/r/PowerBI/comments/gqkeq1/memory_error_how_to_deal_with_it/
https://maqsoftware.com/expertise/powerbi/dax-best-practices
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You are defining this as a calculated column rather than a measure. Your second version would probably work as a measure.
A calculated column cannot be responsive to dynamic slicers since it's only calculated when the data model is loaded or refreshed and not in response to filters and slicers on the report pages.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
104 | |
78 | |
68 | |
61 |
User | Count |
---|---|
144 | |
106 | |
106 | |
82 | |
70 |