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.
Hello
I have a relationship table as below. Where the Shopify Order table contains a list of all transactions at individual Sku code level. I would like to add a calculated column (I think!) that categorises each transaction by the highest value product category sale in that order. Thi aim is that each order can be attributed to a Product group for marketing ROI analysis.
For example:
The first 6 transactions in the table are "Order 1", therefore look-up the product catgeory of each sku (i.e. different types of beers, beer wines, coffees) in the "StockValues" table "Group1" which define the meta cetegory, then return the product category with the highest value. So that say an order made up of lots of different drink types (e.g. Beer, Wine, Juice, Water, Coffee etc) the highest selling drink category by value is identified as "Beer" and this order can be identified as predominantly a beer order rather than a "Coffee" order.
Thanks
Jack
Solved! Go to Solution.
hI @JackEnviro
tRY THIS COLUMN
Column = VAR T1 = SELECTCOLUMNS ( FILTER ( ALL ( 'Shopify Orders' ), 'Shopify Orders'[Order] = EARLIER ( 'Shopify Orders'[Order] ) ), "Group", RELATED ( StockValues[Group1] ), "Value", [Lineitem Price] * [Lineitem count] ) VAR T2 = SUMMARIZE ( T1, [Group], "Values", SUMX ( T1, [Value] ) ) VAR T3 = TOPN ( 1, T2, [Values], DESC ) RETURN MINX ( T3, [Group] )
Please see attached file
hI @JackEnviro
tRY THIS COLUMN
Column = VAR T1 = SELECTCOLUMNS ( FILTER ( ALL ( 'Shopify Orders' ), 'Shopify Orders'[Order] = EARLIER ( 'Shopify Orders'[Order] ) ), "Group", RELATED ( StockValues[Group1] ), "Value", [Lineitem Price] * [Lineitem count] ) VAR T2 = SUMMARIZE ( T1, [Group], "Values", SUMX ( T1, [Value] ) ) VAR T3 = TOPN ( 1, T2, [Values], DESC ) RETURN MINX ( T3, [Group] )
Please see attached file
Hi Zubair
That's perfect - thank you!
Jack
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |