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
Anonymous
Not applicable

How to add new plots based on check box filters

My data has 4 columns: start_date, variant, level, percentage.

The x-axis is the level.

The y-axis is the percentage.

The legend is the variant.

The check box filter is the start_date.

The plot is a line chart sort by the level in ascending order.

For each start_date, I have variants, levels, and percentages.

Here's what I want: For each ticked start_date, I want to add its corresponding set of variant-level-percentage to the existing line chart that I've created, with a new set of legends being created. For example, if I tick 2021-Jun-01, it should show all the variants-levels-percentages on the line chart. If I add 2021-Jul-01, it should add a new set of legends to the existing legends and basically show another set of variants-levels-percentages on the same line chart. So if the 2021-Jun-01 has 4 variants and 2021-Jul-01 has 3 variants, then I would have 7 variants in my legend, which means I would have 7 lines on my line chart.

How do I achieve this?

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Anonymous ,

 

the description you provided should exactly return what you would expect.

The legend items are represented by lines, if there are 7 distinct legend items, there will be 7 lines.

Of course, if there are only 6 distinct legend items across 2 start dates, there will be 6 lines, as one item will be represented by an aggregation of numeric values.

This is how it works and can not be resolved.

Maybe you can use small multiples to keep the legend items separated, the next screenshot demonstrates this:

image.png

The chart is using ColorName on the Small multiples bucket and at the same time, the column ColorName is used as a source for the slicer. In this example, the column ColorName is playing the part of your start_date column

Be aware that the Small multiples feature is in preview, this means you maybe have to enable the feature in the options settings. This article provides more information on how to use this feature: Create small multiples in Power BI (preview) - Power BI | Microsoft Docs

 

Hopefully, this provides what you are looking for.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey @Anonymous ,

 

the description you provided should exactly return what you would expect.

The legend items are represented by lines, if there are 7 distinct legend items, there will be 7 lines.

Of course, if there are only 6 distinct legend items across 2 start dates, there will be 6 lines, as one item will be represented by an aggregation of numeric values.

This is how it works and can not be resolved.

Maybe you can use small multiples to keep the legend items separated, the next screenshot demonstrates this:

image.png

The chart is using ColorName on the Small multiples bucket and at the same time, the column ColorName is used as a source for the slicer. In this example, the column ColorName is playing the part of your start_date column

Be aware that the Small multiples feature is in preview, this means you maybe have to enable the feature in the options settings. This article provides more information on how to use this feature: Create small multiples in Power BI (preview) - Power BI | Microsoft Docs

 

Hopefully, this provides what you are looking for.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
amitchandak
Super User
Super User

@Anonymous , You need to use an independent date table for that in slicer

then try a measure like this , assuming percentage is measure

 

Measure =

var _tab = summarize(filter(Table, Start_date in allselected(Date[Date])),variant)
return
calculate([percentage], filter(Table, Table[variant] in _tab))

 

 

 

refer why you need this

 

Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Anonymous
Not applicable

No, percentage is not a measure. It's just a numeric data column that comes with the data import.

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.