Forum Discussion

Synik_PBI's avatar
Synik_PBI
Icon for Helper II rankHelper II
3 years ago
Solved

Trying to slice a visual based off multiple columns

Hello! I'm running into something I've never ran into before and can't seem to solve after some time spent googling and trying things. What I'm trying to do is slice a page by a bunch of columns inst...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Synik_PBI ,

     

    Sorry, as far as I know, the newly generated field parameter is the text type, and the Y-axis in the line chart requires the numeric type, which will show blank when placed in.

    You can do this in two ways:

    Create a slicer table using Enter data, then use measure+switch():

    1. Enter data.

    2. Create measure.

    Measure = 
    SWITCH(
        SELECTEDVALUE('Slicer_Table'[Value]),
    "A",SUM('Table (2)'[A]),
    "B",SUM('Table (2)'[B]),
    "C",SUM('Table (2)'[C]),
    "D",SUM('Table (2)'[D]),
    "E",SUM('Table (2)'[E]),
    "F",SUM('Table (2)'[F]))

    3. Result.

    You can also use Unpivot Columns in Power Query to convert ABCDEF columns to a single column, but this will change the format of the entire table.

    1. Power Query -- Unpivot Columns .

    2. Result:

     

    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