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
Mkrishna
Helper III
Helper III

Making a new dimension element by combining two element of dimension

Hi All,

 

Thank you for reading my post. I am trying to make a new dimension element by combining two element of the dimension.  First of all I will walk you through the dataset. The pic of a small demo dataset is shown below.

Mkrishna_0-1699567059325.png

The data has column store number, Store Name, Product, Volume/Falvir and Number of Store. The column Volumne/Flavor contains the either volume or flavor of the product. As you can see that there are different volume like, 330ml, 350ml, 1L, 1.5L and different flavor such as Apple, Coconut, Mango, Watermelon.

 

My desired output in the report should look like this. I want to count how many store has each Brand and volume/flavour. As you can see in the table below, I want to have a separate dimension for 330ml, 350 ml. I also want to have a separate dimension by combining these to dimension 330ml/350 ml as shown below. I am unable to make a separate dimension element by combining the two other dimension.  The Number  of store in 330ml/350 ml is the combination of 330ml and 350 ml.

Mkrishna_1-1699567238180.png

Request for your guidance and help

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

Hi @Mkrishna ,

 

Based on your description, the desired result can be obtained by doing the following with Power Query:

1.Pivoted "Volumn/Flavor", "Number of store" columns

2.Then create conditional column

vtianyichmsft_0-1699855601805.png

3.Unpivot columns for all categories of "Volumn/Flavor"

vtianyichmsft_1-1699855689323.png

4.Group by Brand and Attribute

vtianyichmsft_2-1699855892455.png

5.Check the result

vtianyichmsft_3-1699855912647.png

 

Please feel free to correct me and provide more information if I have misunderstood you!

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-tianyich-msft
Community Support
Community Support

Hi @Mkrishna ,

 

Based on your description, the desired result can be obtained by doing the following with Power Query:

1.Pivoted "Volumn/Flavor", "Number of store" columns

2.Then create conditional column

vtianyichmsft_0-1699855601805.png

3.Unpivot columns for all categories of "Volumn/Flavor"

vtianyichmsft_1-1699855689323.png

4.Group by Brand and Attribute

vtianyichmsft_2-1699855892455.png

5.Check the result

vtianyichmsft_3-1699855912647.png

 

Please feel free to correct me and provide more information if I have misunderstood you!

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

Mkrishna
Helper III
Helper III

@v-cgao-msft 
Hello Gao, I hope you are doing well.
I was wondering if you help me model this kind of data

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.