Got it — thanks for clarifying!
You’re saying:
- You don't want to automatically generate keywords from the description or product name.
- You want to manually define a set of keywords for each product (e.g., "gloves, fingers, hand" for Product A).
- Then, you want those manually assigned keywords to appear for every row of that product (even if the product appears multiple times with different batch numbers).
✅ Totally doable — and actually simpler.
Here’s the clean way to set it up:
Step-by-Step Plan
1. Create a Manual Keywords Table
You need a small, separate table that maps each product to its keywords.
You can create this table directly inside Power BI using "Enter Data" or load it from Excel.
Example:
| ProductID | Keywords |
|---|
| 1001 | gloves,fingers,hand |
| 1002 | shirt,cotton,blue |
| 1003 | boots,leather,black |
(You can use Product Name instead of ProductID if you prefer, but ProductID is safer.)
How to create it:
- In Power BI Desktop, go to
Home > Enter Data.
- Create two columns:
ProductID and Keywords.
- Fill in your manual keywords.
- Name the table something like
ProductKeywords.
(Or, if you prefer, you can maintain this mapping in Excel and load it into Power BI.)
—
2. Create a Relationship
Now you need to connect your main data table (the one with multiple rows per product) to this new ProductKeywords table.
- Go to
Model View.
- Drag
ProductID from your main table to ProductID in the ProductKeywords table.
- This creates a one-to-many relationship:
ProductKeywords (one side) → MainData (many side).
(If you use Product Name instead of ProductID, same idea.)
—
3. Bring the Keywords into Your Main Table
You can now either:
- Use the relationship directly in visuals (recommended), or
- Create a calculated column in your main table to "pull" the keywords.
If you want a calculated column:
Go to your main table and create a new column:
Keywords = RELATED(ProductKeywords[Keywords])
This will copy the correct keywords into every row based on the ProductID.
—
4. Set Up Search Functionality
Now that every row has the correct keywords, you can set up the search.
- Create a Text Parameter (What-If Parameter) for search input.
- Create a DAX measure like this:
Keyword Search Filter =
VAR SearchTerm = LOWER(TRIM('SearchParameter'[SearchParameter]))
RETURN
IF(
ISBLANK(SearchTerm),
1,
IF(
CONTAINSSTRING(LOWER('MainData'[Keywords]), SearchTerm),
1,
0
)
)
- Apply this measure as a filter on your visuals (set it to show only when
= 1).
—
Quick Visual Summary
| Step | Action |
|---|
| 1 | Create a manual ProductID → Keywords table |
| 2 | Create a relationship between ProductID fields |
| 3 | Use RELATED() to bring keywords into your main table |
| 4 | Set up a search box and DAX filter |
—
Bonus Tip: If you have a lot of products
If you have hundreds of products and don't want to manually type them in Power BI, you can:
- Export a list of unique ProductIDs from your main table (in Power Query:
Remove Duplicates → Export to Excel).
- Fill in the keywords manually in Excel.
- Load that Excel file back into Power BI as your
ProductKeywords table.
—
Final Note
This method gives you full manual control over the keywords, and ensures that every row for a product gets the correct set of keywords — even if the product appears multiple times (different batches, etc.).
—
Would you like me to also show you how to make the search even smarter (e.g., search multiple keywords at once, like "gloves" OR "hand")? 🚀
If yes, I can show you an even cooler DAX trick!