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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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