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
RRSSDW
Helper I
Helper I

The Recipes challenge

Hi community, have a data-visualization issue that I do not know hot to afford. It is a quite common data visualization challenge when we deal with recipes or similar type of data. Have quite a lot (let me say cooking recipes) using in total say 200 ingredients. I am looking for a filter where the user selects an ingredient (eggs for instance) and it filter all FULL RECIPES containing eggs. 

In terms of data into a relational database, this is a filed per every ingredient (200 fields). If a recipe contains the ingredient, then all records of that recipe are marked, as pictured here. I can easily implement it by a SQL data-procedure, but then the problem is on the visual side. The visual would have 200 slicers, in addition to the current onces and you may agree with me that it is not the proper solution per end user interaction perspective. How would you afford it or how did you do it? The challenge of Recipes.PNG

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, select the first 2 columns, right click and select "Unpivot Other columns".  Create a slicer from the Attribute column.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
RRSSDW
Helper I
Helper I

Thanks. I have done a quick test and I see that it can be the solution. By the unpivot of above pictured structure, every Cake & Ingredients is repeated n times as the number of Ingredients on the left side of the table. Then the value come in. A logical column is needed. I will implement in the real dataset. I expect 8 million rows for this new table that will be added to the data model. I cross fingers on performance. Again, thank for the solution. It did not come to my mind The Recipes challenge2.PNG

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, select the first 2 columns, right click and select "Unpivot Other columns".  Create a slicer from the Attribute column.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.