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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
GBlair
Regular Visitor

Need Help Creating DAX Logic using Selected Value from Slicer Based on Table with No Relationships

I'm new to Power BI and DAX.
I have a sales dataset and need to create a dashboard where users can select from a dropdown to group customers into "Bought" and "Did not Buy" buckets. The dropdown is custom and can contain individual products, product families, or groups of product families.
They can only select one item from the dropdown.

When they select an item the customer id is placed into the "bought" or "did not buy" bucket.

I modified what I think is a standard PowerBI "Financial Sample" spreadsheet.

I added Cust_ID and Product Family columns (sample below).

GBlair_0-1738885540021.png

Here's what I need to be able to do:

GBlair_1-1738885624610.png

The Sales column is total sales (all products) of customers that bought any Furniture product.
The L1 Sales are just the sales of any furniture product.
Thanks for your help, and let me know if I'm not making any sense.

1 ACCEPTED SOLUTION

@GBlair 

Glad it helped you, I have modifed the code based on your new requirement, please check it out:

Fowmy_0-1738963552867.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

5 REPLIES 5
Fowmy
Super User
Super User

@GBlair 

Please check the attached file if this is what you required.

Fowmy_0-1738915519648.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you @Fowmy !
This got me a lot further than I was. It works for individual products. I also have the requirement that a Product Family (or group of individual products) could be selected. In that case I want to consider the customer to have bought if one or more products in the family were purchased.
But I think what you've provided allows me to play around with that requirement.
Thanks again.

@GBlair 

Glad it helped you, I have modifed the code based on your new requirement, please check it out:

Fowmy_0-1738963552867.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks for your help. This gave me exactly what I needed.

some_bih
Super User
Super User

Hi @GBlair please clarify your part, Table with No Relationships, you mean there is only one table with all necesary data in it?
If your table is in Excel and you need simplified filtering and some measures as on picture it could be done already in Excel with Power Pivot.

If everything above is yes, share sample data excel file with expected output for some input. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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