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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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

Top Kudoed Authors