Forum Discussion
Getting sales from another table
hi Adamzzzz
I solved this following this steps:
1. Go to Edit Query and make a copy of Sales Products Table. Rename to Products.
2: In Product Table, delete all the columns except Product Column.
3: Delete duplicate rows. Close & Apply
4: Make relationships between Sales Product & Product also Variable Product & Product
5: Create a measure Price Product
PriceProduct = if(and(HASONEVALUE('Sales Product'[Product]);LEFT(VALUES('Sales Product'[Product]))="$");Mid(VALUES('Sales Product'[Product]);2;FIND(" ";VALUES('Sales Product'[Product]);1)-1))
6: Create a measure SalesValue
SalesValue = If('Sales Product'[PriceProduct]=BLANK();sum('Variable Product'[Sales Value]);'Sales Product'[PriceProduct]*sum('Sales Product'[Units Sold]))
Finish. =)
- Adamzzzz9 years agoFrequent Visitor
Thank you Vvelarde