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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Gerbil
Helper I
Helper I

Word Search Slicer?

Say I have a chart like so:

 

IDDescription
888This is BLUE
150This is dark BLUE
850This is light GREEN
422This is RED
397This is really BLUE
431This tends to be YELLOW
214This seems like it's GREEN
272This is product RED
532This had the color RED

 

I need to make a bar chart that will show a count of how many descriptions have the word "BLUE", "GREEN", "RED", "YELLOW". So the count should end up like so: Blue = 3, Green = 2, Red = 3, Yellow = 1

 

How can I achieve this?

 

This would be a live feed data so every day it needs to refresh whatever calculation it is making.

1 ACCEPTED SOLUTION

Ok well her is one example of the way you can solve it.

 

1. create a table with all your keywords

2 cross join that table to your table you want to search

3 create an if statement that returns the colour value of the description if it contains a keyword

4 remove all other rows.

 

see example attached. 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
vanessafvg
Super User
Super User

so must it find any of the words or be an exact match ie you want to know exactly how many are blue or, you want to know how many have any of those colours?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Any description that contains that word, whether it used to be or is lightly that color, should come up in the filter. So I guess I should have added an expected count. It should come up as Blue = 3, Green = 2, Red = 3, Yellow = 1

and one last question, is this question reflective of your real data or do you have bigger volumes of what you are searching for, and how big is your data?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Real data has about 30 columns and 4k rows

Ok well her is one example of the way you can solve it.

 

1. create a table with all your keywords

2 cross join that table to your table you want to search

3 create an if statement that returns the colour value of the description if it contains a keyword

4 remove all other rows.

 

see example attached. 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thank you! This worked out great.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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