Forum Discussion
Combined item sales
- Anonymous9 years ago
pschommer,
Create a orderid column in SALES table using the DAX below.
orderid = CONCATENATE(SALES[CASHIER],CONCATENATE(SALES[CUSTOMER],SALES[ORDERDATE]))
Then create the OrderID table with the following DAX.
After that, create a relationship between SALES table and the new OrderID table using the ordered column, and you will get expected result by creating three custom columns(Red, Blue and White) following smoupre's suggestion.
OrderID Table = DISTINCT(SALES[orderid])
Regards,
Lydia
Thank you for your reponse. A quick clarification, if I may.
On the SALES table, I can create the concatenated OrderID field.
On the new OrderID table, how do you create unique key values (that I think you want to match with the concatenated values from SALES) when you don't know what those values are? New values are being created all the time and you won't know part of OrderID (Customer name).
I think I understand the rest of your suggestion. Does my question make sense?
pschommer,
Create a orderid column in SALES table using the DAX below.
orderid = CONCATENATE(SALES[CASHIER],CONCATENATE(SALES[CUSTOMER],SALES[ORDERDATE]))
Then create the OrderID table with the following DAX.
After that, create a relationship between SALES table and the new OrderID table using the ordered column, and you will get expected result by creating three custom columns(Red, Blue and White) following smoupre's suggestion.
OrderID Table = DISTINCT(SALES[orderid])
Regards,
Lydia
- pschommer9 years ago
Helper II
Thank you to Anonymous and Greg_Deckler for walking me through this.
The New Table definition based on a function that points to a different table is the unexpected learning for me in this exercise. Although I definitely needed every bit of advice to make it all work. Now that I have this simple example working properly, I will see if I can get it to work with my real dataset.
Your efforts are appreciated!