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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jianlong
Resolver I
Resolver I

select multiple values in slicers to search, find or containsstrings, then correctly

Hi all,

Here is a trick question and hope someone can help.      Two tables:   Client and ICD as below screenshot.  I was able to create measures and count client for a single selection, such as if I select A01 in slicer, I will have client count 2, and B01 gets 3.  

 
Search_label =
var label= search(selectedvalue(Slicers[ICD]),selectedvalue(Client[ICD]),,blank())
return
if(label>0,"Find","Not")

Client_count =
countrows(filter(Client,[Search_label]="Find"))
 
 
my question is how to make mulitiple ICD selections, for example, if I select A01 and B01 , the count will be 4; if I choose C01, C03, I get count 1,  if I choose C01,C02, C03, I get count3.  etc..   
Completely lost now, please kindly help, sorry that I could not load the file, but here is the link, hope you can download and give it a try .   thanks a lot
 

jianlong_0-1645917489945.png

jianlong_1-1645917514640.png

jianlong_2-1645917677069.png

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my solution file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
jianlong
Resolver I
Resolver I

Thanks for your reply Ashish. I will give it a try and see how it goes.  For the real dataset, there will be around 50M rows of records, with ICD, and other codes concatenate together for mulitple columns, if we create scalar values for each ICD and  other columns, there will be probably 500M records or even more if considering the combinations.  This is the reason why we started without creating any relationship and put all the ICD string together.   Best,

Ashish_Mathur
Super User
Super User

Hi,

You may download my solution file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

is it possible for you the repeat the solution sharing?

I do not have the file.  Share some data to work with, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish, I have a multi-select slicer (named Clients) that I want to use for filtering the table rows acting on the Customers column.

For example, looking at the image, the selected rows should be the ones pointed. 

 

_Sarah__0-1710859292262.png

 

Thanks for your support.

Sarah

Hi,

I am not sure how much i can help but i'd like to try.  Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

I cannot share the PBI file because contains sensible data.

I try to post my question as a new topic hoping someone had the same issue.

Thanks for you attention!  

Hi Ashish, Thank you very much, could you please post the dax measure?  For whatever reason, my 2020 Dec version is unable to open your file.   Appreciate your help. 

Hi,

The DAX measure is a simple DISTINCTCOUNT() function.  What's important is the transformation which i used in the Query Editor.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.