I'm busy learning how to use variables in DAX formulas in PowerPivot for Excel 2013.
When put this formula in a calculated column
=
VAR
CurrentPrice = Product[Unit Price]
RETURN
COUNTROWS (
FILTER (
VALUES ( Product[Unit Price] ),
Product[Unit Price] > CurrentPrice
)
) + 1
I'm getting the following error:
The syntax for 'CurrentPrice' is incorrect.
The calculated column 'Product[CalculatedColumn1]' contains a syntax error. Provide a valid formula.
I can't figure out what is the problem with this formula.
I'm using a contoso.xlsx sample workbook.