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
unkCandy
Helper I
Helper I

Get the Filtered values based on a bar chart

Hello Community, 

I am working on a measure to get me the filtered ids based on a person and put them in a table to get the whole process of the filtered ids. 

 

My table has three values: 

  1. Id
  2. The activity presents what has been done for the id
  3. A person who has done the activity

My visuals are as follow:

  1. Table includes all the data: id, activity, Person
  2. Bar chart presents the count of activity by Person

unkCandy_0-1669730738540.png

I want to be able to select a person, for example, Rick and instead of getting only the activities done by Rick, I want to get ids that Rick is included in and shows all activities of these ids.

unkCandy_1-1669730776488.png

The result will look like this: 

unkCandy_2-1669730818123.png

I tried to use the SelectedValue function, but it doesn't show me anything. Is there any way to implement this in Power BI? 

Thank you.

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @unkCandy 

Please try this ,

Measure = 
var _person=SELECTEDVALUE(Person[Person])
return IF(MIN('Table'[Id]) in SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Person]=_person),"ids",[Id]) ,1,0)

vxiaotang_0-1669801990946.png

 

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

v-xiaotang
Community Support
Community Support

Hi @unkCandy 

Please try this ,

Measure = 
var _person=SELECTEDVALUE(Person[Person])
return IF(MIN('Table'[Id]) in SELECTCOLUMNS(FILTER(ALL('Table'),'Table'[Person]=_person),"ids",[Id]) ,1,0)

vxiaotang_0-1669801990946.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, 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.

Top Solution Authors