cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abgnfirdaus
Helper I
Helper I

multiple column in one slicer

Hello there, hope you guys can help me by show and tell. Also, tutorial request. Let say the table is:

EquipmentVoltageRed cableBlue cableYellow cable
TRU 16.6kV0.230.450.65
TRU 26.6kV0.320.50.7
TRU 36.6kV0.40.560.75

Then, I want to put 3 columns in one slicer, show list of :
Slicer :

  • Red cable
  • Yellow cable
  • Blue cable

    Then, when I click Red cable, the data in Red cable will display on line chart. Then, If I click yellow cable, then the line chart will display yellow cable data only. Same as blue cable also.

    Hope you can help me. thank you in advance.
1 ACCEPTED SOLUTION

@abgnfirdaus 

 

test1.gif

Best Regards,
Community Support Team _ Janey

View solution in original post

13 REPLIES 13
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on the first 2 columns and select "Unpivot other columns".  Rename the Attribute column to Cable type.  Now create your slicer.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-janeyg-msft
Community Support
Community Support

Hi, @abgnfirdaus 

 

According to your description, I think you can create a single cable table with all colors and create a measure in line chart to filter.

Like this:

vjaneygmsft_1-1643017287976.png

 

Measure =
SWITCH (
    TRUE (),
    SELECTEDVALUE ( Table2[Cable] ) = "Blue", SUM ( 'Table'[Blue cable] ),
    SELECTEDVALUE ( Table2[Cable] ) = "Red", SUM ( 'Table'[Red cable] ),
    SELECTEDVALUE ( Table2[Cable] ) = "Yellow", SUM ( 'Table'[Yellow cable] )
)

vjaneygmsft_0-1643017268854.png

Did I answer your question? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.

Best Regards,
Community Support Team _ Janey

 

hai. thank you for your solution. can you make a video on how you do it. From step on how you make the new table and how you add the measure for the filter. Im new to the Power BI. Im very sorry. Hope you can guide me. Thank you very much. 

@abgnfirdaus 

 

test1.gif

Best Regards,
Community Support Team _ Janey

Thank you so much for your help. Can you help me with this one also.

https://community.powerbi.com/t5/Desktop/line-chart-type-of-cable-against-date-tested/m-p/2300091#M8...

Hi, @abgnfirdaus 

 

You only need to change the column chart to a line chart, and change the field of the x-axis to [Date Tested].

I have tried. nothing happened. the line chart plot nothing. I have put the Date tested in x- axis and the cable in y-axis. I put the Equipment in Slicer. and create new table for red, yellow, blue cable. then when i choose i equipment, then choose red cable, nothing plot on the graph.

@abgnfirdaus  Put 'equipment' field in legend, If you still have problems, show me the screenshot (Mosaic Privacy).

abgnfirdaus_0-1643098768850.png

 

Hi, @abgnfirdaus 

 

It looks like your real data and sample data are different, the context should be different, so the original method doesn't work.

vjaneygmsft_0-1643102956620.png

vjaneygmsft_1-1643102994756.png

I saw that you have marked the answer to your new question, use the unpivot column method, this solution is versatile but will change the format of the original data, you can do it if you think it is possible.

 

Best Regards,
Community Support Team _ Janey

yeah. i have tried the unpivot things. but i noticed that i only can do unpivot things once only. After that I want to unpivot another column for another slicer, then it shows error. 

Hi, @abgnfirdaus 

 

I believe this is not difficult, you need to know more about the basics. New problems will have new engineers to help you solve.

 

Best Regards,
Community Support Team _ Janey

amitchandak
Super User
Super User

@abgnfirdaus , Create a measure slicer , examples

measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors