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

Matching records and filter the data

Hi ,

 

I have two tables as shown below .

 

TableA:

 

number        Name

1                       a,b

2                       b,c

3                       a

4                       a,c

5                       b

6                       c

 

TableB:

number        Name

1                       a

2                       b

3                      c

 

Requirement is i had two tables as shown above, i have a slicer value from table  tableB . for example if i select name value a from tableB it needs to be filter a contain values need to be filter in tableA. please let me know the process.

               

Example : i have selected Value A from TableB

 

TableBTableB

 

 

 

 

 

Than need to filter values in TableA as shown below .

 

TableATableA

Please let me know the process to achieve the result .

 

Thanking you in  advance .

 

Regards,

Srinivas.

 

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @SrinivasaRao5_ ,

 

Try this:

Name Measure =
IF (
    SEARCH ( SELECTEDVALUE ( TableB[Name] ), MAX ( TableA[Name] ),, BLANK () )
        <> BLANK (),
    MAX ( TableA[Name] )
)

search.gif

 

 

Best Regards,

Icey

 

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

9 REPLIES 9
Icey
Community Support
Community Support

Hi @SrinivasaRao5_ ,

 

Try this:

Name Measure =
IF (
    SEARCH ( SELECTEDVALUE ( TableB[Name] ), MAX ( TableA[Name] ),, BLANK () )
        <> BLANK (),
    MAX ( TableA[Name] )
)

search.gif

 

 

Best Regards,

Icey

 

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

Hi ,

 

Thank you so much for your kind help , after filter the records i need to show the count(number of rows affected in table A) in card visualization .could you please help me on this .

 

i was tried to showing the count but over all count only displaying in the visualization .filtered records rows count is not displaying.

 

 

Regards,

Srinivas.

Hi Team ,

 

Please help me in this .i am able to filter the rows as shaown above , but i am trying to show the filtered affected rows count in the card visualization but its showing overall count only not changing the as per the filter .

 

Regards,

Srinivas.

Hi @SrinivasaRao5_ ,

 

Try this:

Count = COUNTAX ( FILTER ( TableA, TableA[Name] = [Name Measure] ), TableA[Name] )

count.gif

 

Best Regards,

Icey

 

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

Hi @Icey  ,
 
Thank you so much for your support , i am trying to select more than one value from slicer that its showing same constant vlaue in card visual. please suggest me the solution .
 
Regards,
Srinivas.

 

Hi ,

 

Please suggest me the solution.

 

Regards,

Srinivas.

Thank you  @Icey , its worked for me .

 

Regards,

Srinivas.

kentyler
Solution Sage
Solution Sage

Live would be so much easier if you transform the first table before loading it into power bi

numberName
1a
1b
2b
2      c
3      a
4a
4      a
5  b
6 c

Then you would not need to write ANY DAX code, a regular slicer would work fine.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Hi @kentyler  ,

 

Thank you for your response , i had amount column in that table . as said  if i split the name ,  that time  amount will be repeat multiple times and it is huge data with many columns . please let me know any other approach .

 

Thank you .

 

Regards,

Srinivas.

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.