Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

GROUPBY + ALLEXCEPT functions

Hello, I have this table from which I want to get the average qty per order. 1) I have this measure to help me achieve it. Measure = Var Group_1= GROUPBY( 'Table',        'Table'[Month], ...
  • AlexisOlson's avatar
    4 years ago

    I think something simpler might work. Is this what you're after?

    Measure =
    VAR Group_1 =
        GROUPBY (
            'Table',
            'Table'[Order],
            "Sum", SUMX ( CURRENTGROUP (), 'Table'[Qté] )
        )
    RETURN
        AVERAGEX ( Group_1, [Sum] )