Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Solved! Go to Solution.
Hi @Oros ,
according to the sample table, I am able to get the correct table.
Do the same customer have different pricing level?
based on the sample data, i think you can just drag the columns to table to get the expected output
Proud to be a Super User!
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.
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.
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.
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.
Oh 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
Hi @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.
Hi @Oros ,
according to the sample table, I am able to get the correct table.
Do the same customer have different pricing level?
Hi @Chew_WenJie ,
May I confirm the relationship between your tables? For some reasons, the calculated column (PRICE) shows 3 pricing levels. The only correct equivalent price is $12.00 for this pricing level. Maybe I am missing something here. Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |