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
Marcin86
Frequent Visitor

Filtering a chart by another table containing parts of a word in a column.

Hi, 

I have problem with filtering chart by table contain unifid value.

Example data:

Marcin86_2-1686038500845.png

I am looking for a way to use table 2 to filter the chart (based on table 1).
The chart shows the sum of the Number column for a given month.

 

I can do to filter the tables but I have a problem with the chart.

Thanks

 

sorry for my english 🙂

2 REPLIES 2
Marcin86
Frequent Visitor

It's almost good, but how to handle all the selected ones?

v-yangliu-msft
Community Support
Community Support

Hi  @Marcin86 ,

 

Here are the steps you can follow:

1. Create measure.

Flag =
var _select=SELECTCOLUMNS('Table2',"1",[Region])
return
IF(
CONTAINSSTRING(
MAX('Table'[regionCode]),_select)=TRUE(),1,0)
Value =
    SUMX(
    FILTER(ALLSELECTED('Table'),  YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))&&MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))),[Number])

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1686190367353.png

3. Result:

vyangliumsft_1-1686190367356.png

 

Best Regards,

Liu Yang

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

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.