Forum Discussion
MdxScript(Model) (37,5) Calculation error in measure
- 11 months ago
Hi MalgorzataF , Thank you for reaching out to the Microsoft Community Forum.
You’re getting that error because the slicer is based on a field parameter (the Value table), which internally uses a composite key made up of both [Value] and [Value Fields]. Since your measure only references one part of that key ([Value]), the engine throws the error. Instead of using a measure directly in the slicer, create a disconnected table with a single column (for example, Selector[Option]) listing the same options and use SELECTEDVALUE(Selector[Option]) inside your measure to switch logic. Power BI slicers can’t take measures directly, they must be bound to columns.
Hi MalgorzataF ,
hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.