Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

sku categorization

hi team
i have a requirement of categorizing each sku as high and low based on target sales.

So i have 2 tables - first one is order table where i have order details at line item which has sku data-

 

YearSKUCategoryCountrySalesLevel
20201AppleUSA10 
20202BallUAE20 
20203AppleUAE30 
20214BallUK40 
20212CLutchUSA10 
20211AppleUAE30 
20216clutchUK40 

 

Now i have another Target table as below

 

yearcategorycountryTarget
2020AppleUSA15
2020AppleUAE20
2020AppleUK5
2020BallUSA10
2020BallUAE25
2020BallUK15
2020ClutchUSA20
2020ClutchUAE30
2020ClutchUK35
2021AppleUSA10
2021AppleUAE25
2021AppleUK15
2021BallUSA10
2021BallUAE25
2021BallUK15
2021ClutchUSA20
2021ClutchUAE30
2021ClutchUK35

 

now i want to create a column which will give categorize  each sku as high or low based on whether they are high or low on compasison with  target

Expected output-

YearSKUCategoryCountrySaleslevel
20201AppleUSA10low
20202BallUAE20low
20203AppleUAE30high
20214BallUK40high
20212CLutchUSA10low
20211AppleUAE30high
20216clutchUK40high

 

Please help me with the dax for the same and also on relationships as there can be only one relationship
even that relationship is going to be many to many

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      hi

      the thing here is that category and country information are in a different dimension table and are related the sales table by a primary key

      instead of putting category table name is showing an error table having multiple values and cant find a simgle value

      on using max (category table name) is not giving the correct output