Forum Discussion
Unique values in calculated column
- 1 year ago
Hey! Sorry to hear that, maybe try this Dax measure:
Calculated_Column_Measure =
VAR FirstValue =
CALCULATE(
MIN('Table'[Colour ID]),
ALLEXCEPT('Table', 'Table'[Product Number])
)
RETURN
FirstValue----- CALCULATE(MIN('Table'[Colour ID])...) finds the minimum Colour ID per Product Number.
and ALLEXCEPT('Table', 'Table'[Product Number]) ensures that the calculation is performed only within each Product Number group.Tell me if this works! 😁😁
Function 'MINX' is not allowed as part of calculated column DAX expressions on DirectQuery models. I am getting this message
Hey! Sorry to hear that, maybe try this Dax measure:
Calculated_Column_Measure =
VAR FirstValue =
CALCULATE(
MIN('Table'[Colour ID]),
ALLEXCEPT('Table', 'Table'[Product Number])
)
RETURN
FirstValue
----- CALCULATE(MIN('Table'[Colour ID])...) finds the minimum Colour ID per Product Number.
and ALLEXCEPT('Table', 'Table'[Product Number]) ensures that the calculation is performed only within each Product Number group.
Tell me if this works! 😁😁