Forum Discussion
Oros
Post Prodigy
3 years agoIf 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 a...
- 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?
Chew_WenJie
Resolver III
3 years agoOh I see, understood. I think for the error of code above you need to change to create new column instead of measure.
Below is the code for measure and column, you may choose which you want.
Create New Measure :
Measure =
var pricinglevel = SELECTEDVALUE('Customer Table'[Pricing Level])
return
CALCULATE(SUM('Product Table'[Price]),'Product Table'[Pricing Level]=pricinglevel)Create New Column :
Pricing = CALCULATE(SUM('Product Table'[Price]),'Customer Table'[Pricing Level]=EARLIER('Product Table'[Pricing Level]))
Hope this can help you, you also can refer to the ryan_mayu solution
Oros
Post Prodigy
3 years agoHi Chew_WenJie ,
Thank you for your update.
When the (new) column is created, a customer shows 3 different pricing level instead of only 1 pricing level. The price that should show should only be $48.00.
When the (new) measure s created, the resulting table became blank.