Forum Discussion
understanding a DAX formula
- Anonymous2 years ago
Hi Anonymous
I simply restored your data, all but "Price Impact - Sales - CY vs PY $" are the source data.
I created a measure as follows.
Price Impact - Sales - CY vs PY $ = IF( MAX([Price per Unit -PY $]) = BLANK(), BLANK(), SUMX( FILTER( FactSalesInvoiceLine, [Price per Unit -PY $] > 0 ), [Unit Quantity - CY] * [Price per Unit - CY vs PY $] ) )Result:
If this is not your desired outcome, please show your desired outcome in excel form.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous2 years ago
Hi Anonymous
[Price per Unit - PY $] is a measure?
If so, please try removing MAX. I don't have your source data, so in my test the field is column need to use MAX.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- AnonymousNot applicable
Hi Anonymous
I simply restored your data, all but "Price Impact - Sales - CY vs PY $" are the source data.
I created a measure as follows.
Price Impact - Sales - CY vs PY $ = IF( MAX([Price per Unit -PY $]) = BLANK(), BLANK(), SUMX( FILTER( FactSalesInvoiceLine, [Price per Unit -PY $] > 0 ), [Unit Quantity - CY] * [Price per Unit - CY vs PY $] ) )Result:
If this is not your desired outcome, please show your desired outcome in excel form.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Anonymous
thanks for the response, I get a message that says The MAX function only accepts a column reference as the argument number 1
- Ashish_MathurSuper User
Hi,
Share the download link of the PBI file.
- AnonymousNot applicable
Hi Anonymous
[Price per Unit - PY $] is a measure?
If so, please try removing MAX. I don't have your source data, so in my test the field is column need to use MAX.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.