Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

PathContains with SelectedValue in Calculated Column or Calculated Table

Hi, everyone.   I am stuggling with something. I am using the Path calculation to get a hierarchical path (e.g. A|B|C). When I reference this with a measure using PathContains and Selected Value, i...
  • v-jiascu-msft's avatar
    8 years ago

    Hi Scott,

     

    This is the trick of context. The context of SELECTEDVALUE in a calculated column is the whole table, So it would always return blank because there isn't a single selected value. Maybe you can try it with CALCULATE. But the calculated column won't interact with the slicer or filter in the report view.

    Column = CALCULATE(SELECTEDVALUE(DimProduct[BrandName], "NOT Found"))

    Best Regards,

    Dale