Forum Discussion
If statements
- 3 years ago
Hi Oros ,
according to the sample table, I am able to get the correct table.
Do the same customer have different pricing level?
Hello, is there any relationship between the two table? if no, i think linking the pricing level between two table will solve the problem. Or, another way is create a measure
CALCULATE(SUM('PRODUCT TABLE'[PRICE]),'CUSTOMER TABLE'[PRICING LEVEL]='PRODUCT TABLE'[PRICING LEVEL])
Hope able to solve the problem.
- Oros3 years agoPost Prodigy
Hi Chew_WenJie ,
Thank you for your quick reply. The customer table is related to product table through PRICING LEVEL. Somehow, the measure that you suggested cannot find the column 'PRODUCT TABLE' [PRICING LEVEL]). DOes the PRICING LEVEL have to be a measure and NOT a column? Thank you again.
- Chew_WenJie3 years agoResolver III
Yes, it can be a column, you may refer to the dax below.
Pricing = CALCULATE(SUM('Product Table'[Price]),'Customer Table'[Pricing Level]=EARLIER('Product Table'[Pricing Level]))Hope this can help you.
- Oros3 years agoPost Prodigy
Hi Chew_WenJie ,
Thank you again for your reply. Here is the actual error. Please note that Customer_Price_Group and Sales_Code are both equivalent to PRICING LEVEL in the example above. CustomerPricing table is equivalent to PRODUCT table.