cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Prodigy

## Line Charts with Filter

Hello,

I have the following three measures I want to show as a line chart:

MeasureA = CALCULATE(SUM(Table1[Value1]), Table1[Layer] = "A")

MeasureB = CALCULATE(SUM(Table1[Value1]), Table1[Layer] = "B")

MeasureC = CALCULATE(SUM(Table1[Value1]), Table1[Layer] = "C")

with the possibility to filter A, B, C (or all possible combinations AB, BC, AC, ABC). How can I do that? Always have problems when i choose two values.
1 ACCEPTED SOLUTION
Community Support

Like this?

Or like this?(In this case, only two lines can be returned according to the user's choice.)

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

8 REPLIES 8
Community Support

Like this?

Or like this?(In this case, only two lines can be returned according to the user's choice.)

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support

Like this?

If not, please show the screenshot of the 'Line chart'. I want to know which fields you use in the visual and what effect you want to get.

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Post Prodigy

No I am looking for something like this:

https://community.powerbi.com/t5/Desktop/Line-chart-slicer/td-p/123353

But I want to see for example two line charts when two are selected.

Super User

@Pikachu-Power , Can you take layer as a legend ? Legend should create two lines

Post Prodigy

Ok sorry... layer in legend is possible.

But I use a line- and bar chart and have more measures in the value field. as far as i know we have no legend there or we cant use the legend field in case of more measures in the value field.

i suppose an another way to filter the line carts (and bar charts) will complicated?

Microsoft Employee

Instead of 3 measures, why not just use the Table1[Layer] column in the legend for the visual and add a slicer for that column too?

Regards,

Pat

Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

Post Prodigy

I already tried this... you never see two line charts if you selected two. you see one line chart with the sum of these.

Solution Sage

Hi,

Please create one more measure with the if or switch function. then pass the measure in the value section of the visual.

Ex: If (selectedmeasure = A, A, if selectedMeasrue = B, C)

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,