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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
amirzoyan
Regular Visitor

Microsoft BI Desktop DAX Formula

Hi, 

 

I am hoping somebody can provide some direction on a problem I am having. 

I am trying to create a report in BI Desktop. I've loaded the data that has multiple columns. 

Specifically - here is an example:

 

Product Hierarchy 1Product Hierarchy 2Value 
Product XConsumables 1$$$
Product XConsumables 2$$$
Product XHardware 1$$$
Product XHardware 2$$$

 

I am trying to create two new columns for Product X. One column combines hardware 1&2 along with its values, and a second column combining consumables 1&2 from column "Product Hierarchy 2". 
Ultimately, the visual I am trying to achieve in BI should look like this:

 

Product XValue 
Consumables (1&2)$$$
Hardware (1&2)$$$

 

Any suggestions on the DAX formula I should be using to achieve this?

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

3 REPLIES 3
v-deddai1-msft
Community Support
Community Support

Hi @amirzoyan , 

 

Would you please follow the steps in the link :https://docs.microsoft.com/en-us/power-bi/desktop-grouping-and-binning

 

For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/ESGiM9r4KfxLuiK-6U...

 

Best Regards,

Dedmon Dai

amitchandak
Super User
Super User

@amirzoyan 

You can create a new column

switch(true(),
search("Consumables",[Product Hierarchy 2],,0)>0 ,"Consumables (1&2)",
search("Hardware",[Product Hierarchy 2],,0)>0 ,"Hardware (1&2)",
"Others"
)

Or refer :https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
VijayP
Super User
Super User

you can create Groups




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors