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
irnm8dn
Post Prodigy
Post Prodigy

Managing Data in Slicer more Effectively through DAX - PLEASE HELP!

I created a dashboard comprised of two datasets.  Dataset A includes a superset of information, including all customer names and customer IDs.  Dataset B is a smaller dataset, representing sales over the last 12 months and only includes only the customer ID.  The relationship between the two datasets is based customer ID.

 

The body of the dashboard represents all Customer Names who have had a purchase in the last 12 months, matched on ID.  I would like to also constrain the Slicer to customer names (from dataset A), who have a matching ID in dataset B.  The effect will limit the slicer to only customers who have had a purchase in the last 12 months, as opposed to the superset of customer names in dataset A.

 

As a PowerBI user, I want to limit the slicer to customer names, so that the only selectable option from the slicer is a customer whose ID is found in both datasets.

 

Thanks!

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI, @irnm8dn

After my research, you could try this simple way

Use RELATED Function or LOOKUPVALUE Function to create a Name column for table B

Related NAME = RELATED('Table A'[Name] )


Lookup NAME = LOOKUPVALUE('Table A'[Name],'Table A'[ID],'Table B'[ID])

For example:

This is table AThis is table AThis is table BThis is table B

then

12.JPG

then use the new name column for the slicer.

 

Best Regards,
Lin

 

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

1 REPLY 1
v-lili6-msft
Community Support
Community Support

HI, @irnm8dn

After my research, you could try this simple way

Use RELATED Function or LOOKUPVALUE Function to create a Name column for table B

Related NAME = RELATED('Table A'[Name] )


Lookup NAME = LOOKUPVALUE('Table A'[Name],'Table A'[ID],'Table B'[ID])

For example:

This is table AThis is table AThis is table BThis is table B

then

12.JPG

then use the new name column for the slicer.

 

Best Regards,
Lin

 

Community Support Team _ Lin
If this post helps, then 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.