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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Filter table using SELECTEDVALUE and FIND functions

Hi,

I am trying to filter out the table and I have the below data:

HIMANSHU_SINGH_0-1645101132926.png

With the above data, I have created the below bar chart in which I have set the "Branch" filter to CS:

HIMANSHU_SINGH_1-1645101245672.png

Now if I click on the AB bar, I should get the below output:

HIMANSHU_SINGH_2-1645101292816.png

I am getting the desired result if I am passing the Branch name manually like this:

Measure2 = INT(FIND("AB",MAX(students[Name]),1,0) >0)


but if I pass the selected value measure which in Measure 2:

 

Measure1 = SELECTEDVALUE(students[Name])

Measure2 = INT(FIND([Measure1],MAX(students[Name]),1,0) >0)

 

after this I am getting the below output which is a blank table:

HIMANSHU_SINGH_3-1645101541574.png

can anybody tell me what I am doing wrong here and how I can achieve the desired output?

@amitchandak 
@AllisonKennedy 

@parry2k 

@lbendlin 

7 REPLIES 7
parry2k
Super User
Super User

@HIMANSHU_SINGH it is very hard to know what you tried, what is not working? A simple reply "it didn't work out" doesn't help with anything.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@HIMANSHU_SINGH check this video my youtube channel which address the similar problem, tweak the solution as you see fit.

 

https://youtu.be/zS1IDl3DLak

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

It didn't work out.

amitchandak
Super User
Super User

@HIMANSHU_SINGH , Based on what I got.

In power query duplicate column Name and split into two columns using Split 

 

Or create new column in Dax

 

_1  = left([Name],2)

_2 = right([Name],2)

 

then you can use the first column to drill to current name column

Above dax is not working. Giving the below error:

HIMANSHU_SINGH_0-1645106598044.png

@amitchandak and I can't put 2 get only 1st two chars. It can be of any length.

@HIMANSHU_SINGH , I think you are creating a measure not a column. I suggested a column

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

@amitchandak I am not able to attach the sample file here as I can't see the attach file option. I have given the sample data and desired output data in my post.

HIMANSHU_SINGH_0-1645108866873.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.