Forum Discussion
If statements
Hello.
Does this issue need a conditional measure? Any idea is highly appreciated. Thanks.
I have the following product table and customer table.
For some reasons, the price that appears in the results table is always based on the pricing level (#4)
Based on customer XYZ's pricing level (#2), the correct table result should be
Hi Oros ,
according to the sample table, I am able to get the correct table.
Do the same customer have different pricing level?
12 Replies
- ryan_mayuSuper User
based on the sample data, i think you can just drag the columns to table to get the expected output
- Chew_WenJieResolver III
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.
- OrosPost 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_WenJieResolver 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.