Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Duplicate Values shown in slicer caused by Switch Statement

I've got a calculate column which is doing some State conversions in my data.  This column is then used as the slicer on my report.  By using either nested IF or Switch, the end result is text is app...
  • GilbertQ's avatar
    9 years ago

    hi Anonymous

     

    I think it somehow has to do with the nested SWITCH inside your SWITCH.

     

    What I would do in your situation is to do this in the Query Editor and create a conditional column. Because it applies the conditions from top to bottom you can easily add change it from your [Description] column to your [ParentId] column. 

     

    In doing so it will then have all your required states in one column, so that when loaded into the Power BI data model, the slicer will only see it as a standard column and not as a calculated column.