Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.