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
Zaoka
New Member

Prefered SKU per posname with conditions

HI,

 

I'm trying to combine two tables with power pivot to see prefer SKU per Posname according to State and RetailCategory, but I'm doing something wrong

 

1. table is Base with columns Posname, Entity, RetailCategory, Sales person ID
2. table is prefer SKU with colmns Entity,RetailCategory, SKU name, days

My result should be single Power pivot table in tabular form

 

Posname, Entity, RetailCategory, Sales person ID, SKU name, days

 

I created a helper column in both tables with a combination of State & RetailCategory as single column and "key" table with all combination of State & RetailCategory . Then I load it all to power pivot , created relation and result is wrong , I simply get all possible SKUs and states per posname

 

Screenshot_3.png

 

Example excel google drive 

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

Hi @Zaoka ,

 

We can create two dimision tables to meet your requirement:

Entities = DISTINCT(UNION(DISTINCT('Base'[Entity]),DISTINCT('Prefered SKU'[Entity])))

 

Categories = DISTINCT(UNION(DISTINCT('Base'[RetailCategory]),DISTINCT('Prefered SKU'[RetailCategory])))

 

1.jpg

 

Then we can use them in matrix visual to get the SKUs for postname:

 

2.jpg

 

But for each certain postname, they may have multi SKUs, such as for postname 000008, could you please share the logic you want to get teh prefered SKU if the above matrix cannot meet your requirement?

 

3.jpg4.jpg


Best regards,

 

Community Support Team _ Dong Li
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

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Zaoka ,

 

Sorry for our mistake, we checked again find the logic in the third excel sheet, we change the value of matrix to distinct count of sku and get the expected result 79:

 

1.jpg2.jpg


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Zaoka ,


Does this issue have been resolved?Could you please provide more details about it If it still not be resolved? Please don't contain any Confidential Information or Real data in your reply.


Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Zaoka ,

 

We can create two dimision tables to meet your requirement:

Entities = DISTINCT(UNION(DISTINCT('Base'[Entity]),DISTINCT('Prefered SKU'[Entity])))

 

Categories = DISTINCT(UNION(DISTINCT('Base'[RetailCategory]),DISTINCT('Prefered SKU'[RetailCategory])))

 

1.jpg

 

Then we can use them in matrix visual to get the SKUs for postname:

 

2.jpg

 

But for each certain postname, they may have multi SKUs, such as for postname 000008, could you please share the logic you want to get teh prefered SKU if the above matrix cannot meet your requirement?

 

3.jpg4.jpg


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors