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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
aakash_086
Regular Visitor

Slicer based on all the column name not effecting the line charts

My Data is like 

Monthsk6sk7sk8sk9
30/04/20186010648
31/05/20181216489
30/06/201826855154
31/07/201883171172
31/08/20186199719

 

when puting up a line chart (each for all the columns) I am not able to use the sk6,sk7,sk8,sk9 (i.e column names) as slicer so as to select/unselect the line only of that particular column

aakash_086_0-1712937643096.png

 

2 ACCEPTED SOLUTIONS
Idrissshatila
Super User
Super User

Hello @aakash_086 ,

 

you need to unpivot the sk columns so that you can use them in a slicer.

 

check this to learn more about this concept https://youtu.be/URAJ_aDiREE?si=9VqVRrkVECxnHjmF

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

Hi @aakash_086 

 

as @Idrissshatila suggested, unpivoting is a preferred approach, see created file here:

 

https://drive.google.com/file/d/16jVt8M7V-jnoWfQHIzVHPjVU9D4MRlYy/view?usp=sharing

 

mahenkj2_0-1712990378028.png

 

Hope it helps.

View solution in original post

8 REPLIES 8
ezequielalmeida
Regular Visitor

Hello @aakash_086, assumming that you have good reasons for not wanting to unpivot those columns, seems to me that what you're trying to do can be solved using Field Parameters - https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters

ezequielalmeida_1-1712961641720.png

You would need to create an explicit measure for each field's sum, and then create a field parameter containing said measures. Then you can add the parameter to the Y axis in the visual and can also add a slicer with the same parameter, achieving the behaviour you're looking for. 

Here's an example.

 

Hope this helps, let me know anyways.

Hi @ezequielalmeida : Thanks for the suggestion , I tried it and it works great. Thanks for help !!

 

Idrissshatila
Super User
Super User

Hello @aakash_086 ,

 

you need to unpivot the sk columns so that you can use them in a slicer.

 

check this to learn more about this concept https://youtu.be/URAJ_aDiREE?si=9VqVRrkVECxnHjmF

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi @Idrissshatila : Thanks for suggesting the solution , but unpivoting it makes new column and value and the original columns disappear, I want to use the columns for individual line charts and then use slicers to select/unslect line graphs for any of the sk values.

Hi @aakash_086 

 

as @Idrissshatila suggested, unpivoting is a preferred approach, see created file here:

 

https://drive.google.com/file/d/16jVt8M7V-jnoWfQHIzVHPjVU9D4MRlYy/view?usp=sharing

 

mahenkj2_0-1712990378028.png

 

Hope it helps.

Hi @mahenkj2 : Thanks for the solution , certainly the easiest approach approach to achieve it.

Hi,

Why would Idrissshatila's suggestion not work for you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur : I tried with Idrissshatila's suggestion but I was not approaching it correctly, perhaps after unpivoting we can use the unpivoted columns and no need for pivited columns anymore to plot it. Thanks !!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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