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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pikachu-Power
Post Prodigy
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
v-lionel-msft
Community Support
Community Support

Hi @Pikachu-Power ,

 

Like this?

v-lionel-msft_0-1605084929515.png

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

v-lionel-msft_1-1605085011696.png

 

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.

View solution in original post

8 REPLIES 8
v-lionel-msft
Community Support
Community Support

Hi @Pikachu-Power ,

 

Like this?

v-lionel-msft_0-1605084929515.png

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

v-lionel-msft_1-1605085011696.png

 

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.

v-lionel-msft
Community Support
Community Support

Hi @Pikachu-Power ,

 

Like this?

v-lionel-msft_0-1604475987799.png

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.

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. 

amitchandak
Super User
Super User

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

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?

mahoneypat
Employee
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!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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

nvprasad
Solution Sage
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,
N V Durga Prasad

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.