Forum Discussion
Trying to slice a visual based off multiple columns
- Anonymous3 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
Hi,
In the Query Editor, select the first 3 columns, right click and select "Unpivot Other Columns". Rename the attribute column to something meaningful. Now create your visual.