cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Chart not filtering based on a non connected table value

Hi All,

 

I have 3 visuals in my report and one gets filtered based on the Year filter that i have from a unrelated table.

 

But the other two visuals dont get filtered based on this year filter.

 

Any idea how can i make them filtered without having a active connection between table1 and year table?

 

1 ACCEPTED SOLUTION

 

@Anonymous 

You can use in values() for unrelated tables with selectedvalue(), e.g.
if selectedvalue.JPG

 

Paul Zheng _ Community Support Team
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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , Assumed year is disconnected table

measure =
calculate(countrows(Table), filter(Table, Table[Year] in values(Year[Year])))


measure =
calculate(countrows(Table), filter(Table, Table[Year] in allselected(Year[Year])))

 

or

 

measure =
calculate(countrows(Table), filter(Table, Table[Year] in values(Year[Year])))

 

want to plot on visual
measure =
calculate(countrows(Table), filter(Table, Table[Year] = max(Year[Year])))

Anonymous
Not applicable

@amitchandak  Thanks Amit.

But i think i need a selector kind of measure to apply it on the visual

 

For example, if(selectedvalue( year[year])=query1[year],1,0)

 

but not sure if this is the right way to write

Anonymous
Not applicable

Hi all,

 

any thoughts about it please... please...

 

@Anonymous 

You can use in values() for unrelated tables with selectedvalue(), e.g.
if selectedvalue.JPG

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors