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
jakub_vana
New Member

How to use 2 different filters on the same value in one graph

Hello,

I am using one graph (line chart) for the visualization of one value and I need to extend this visualization. I want to display the second value in the line chart. This is not a problem. The problem is that I need to display the same value, but only apply a different filter to it. Is there any way how to do it in one line chart? I do not want to have two line chart graphs. I want to see the difference in one graph.

 

Thank you for your help.

 

Jakub

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @jakub_vana 

 

Are the two filters on the same column or on different columns? If it is on the same column, you can add that column to Legend field of the line chart. Then in Filter pane, filter the legend column to show only values you want to see. 

vjingzhang_0-1664418451203.png

 

Another solution is to create two measures and add filter expressions in the measures. For example, 

Gross Sales France = CALCULATE(SUM(financials[Gross Sales]),financials[Country]="France")

Gross Sales Germany = CALCULATE(SUM(financials[Gross Sales]),financials[Country]="Germany")

Add both measures to Y-axis of the line chart. 

vjingzhang_1-1664418753911.png

 

If the two filters are on different columns, you can use the latter solution with measures. 

 

Hope this helps. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
jakub_vana
New Member

Thank you very much, it helps me a lot!

v-jingzhang
Community Support
Community Support

Hi @jakub_vana 

 

Are the two filters on the same column or on different columns? If it is on the same column, you can add that column to Legend field of the line chart. Then in Filter pane, filter the legend column to show only values you want to see. 

vjingzhang_0-1664418451203.png

 

Another solution is to create two measures and add filter expressions in the measures. For example, 

Gross Sales France = CALCULATE(SUM(financials[Gross Sales]),financials[Country]="France")

Gross Sales Germany = CALCULATE(SUM(financials[Gross Sales]),financials[Country]="Germany")

Add both measures to Y-axis of the line chart. 

vjingzhang_1-1664418753911.png

 

If the two filters are on different columns, you can use the latter solution with measures. 

 

Hope this helps. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

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.