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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
TryingToLearn
New Member

New DAX Measure - return a (unique) value on a field from a selection from another field

Hello All,

 

STOREITEMS SOLD
AElectronics, Sporting Goods
BSporting Goods
CElectronics, Sporting Goods, Apparel

 

Would like to create a new measure for the unique items:

Category
Apparel
Electronics
Sporting Goods

 

Where selecting the Category value will return the Store(s) that sell the item(s).

For example ---

Selecting Apparel returns Store C

Selecting Electronics returns Store A and Store C

Selecting Sporting Goods returns Store A, Store B, and Store C

 

I'm new to creating DAX measures. Any help will be greatly appreciated. 


Have a great day and weekend.

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Sold Item.pbix

 

ThxAlot_0-1690025390860.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

Sold Item.pbix

 

ThxAlot_0-1690025390860.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Thanks so much, @ThxAlot ! Really appreciate it.

rubayatyasmin
Super User
Super User

Hi, @TryingToLearn 

 

use selected value, and concatenex

 

Store By Category =
VAR SelectedCategory = SELECTEDVALUE('Category'[Category])
RETURN
CONCATENATEX(
FILTER('StoreItems', CONTAINSSTRING([Items Sold], SelectedCategory)),
[Store],
", "
)

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Hi @rubayatyasmin,

 

Thank you for replying to my post. Unfortunately this part is causing issues:

 

FILTER('StoreItems',

 

I changed it to 'Store' which is the field name, but the measure is showing a "cannot find the table 'Store'" error.

 

'Store' and 'Items Sold' fields are on the same table (Store_Table).

 

Thanks again.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.