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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Emmy88_
Helper I
Helper I

Create buckets based on exact recipe values

Hi all,

 

I am looking for buckets based on exact same ingredient & volumes. Underneath example data.

 

You see 2 products: 28682 & 29274. 

 

28682 has 2 productions -> 100584919  & 100585055, both of them with exact same ingredients and exact same ingredient volume. If this is the case i would like to create 1 bucket for the 2 productions.

 

29274 has 3 productions, all with different volume & ingredient, so these orders should not be in buckets but separate.

 

Emmy88__0-1728901026754.png

 

How will i be able to structure this?

 

Thank you!

 

Emmy

 

 

 

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi  @Emmy88_ ,

 

Could you please clarify what you mean by 'create 1 bucket for the 2 productions'? Do you want to create a new column for bucket?

If possible, could you also provide a sample of your data source or the pbix file?

 

Best Regards,

Bof

Emmy88_
Helper I
Helper I

Hi Kedar,

 

Thank you for your help. I did follow the exact steps however i see bucket for all productions, whereas material 29274 should have separate. Do you know what is going wrong here?

 

Emmy88__0-1728905298259.png

 

Emmy88__1-1728905340761.png

 

 

 

Emmy88__2-1728905390788.png

 

Emmy88__3-1728905415844.png

 

Gr,

 

Emmy

Kedar_Pande
Super User
Super User

Create a Calculated Column:

UniqueID = 
TableName[Ingredient] &
"-" &
FORMAT(TableName[Volume], "General Number")

Create a new table:

ProductionGroups = 
ADDCOLUMNS(
SUMMARIZE(
TableName,
TableName[Product],
TableName[UniqueID]
),
"ProductionCount", COUNTROWS(FILTER(TableName, TableName[UniqueID] = EARLIER(TableName[UniqueID])))
)

Create a measure:

Bucket = 
IF(
MAX(ProductionGroups[ProductionCount]) > 1,
"Bucket",
"Separate"
)

Use a table or matrix visual to display your products.
Add the Bucket measure to your visualization to see bucket assignments

 

If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

 

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.