Forum Discussion

polaris3028's avatar
polaris3028
Helper III
7 years ago
Solved

Subtotal not correct

HI Gurus,

 

Can you please help on my issue?

 

SUMX(VALUES(FTDev2018[Region]), AVERAGE(FTDev2018[HEADCOUNT])).  That's the measure I created to get the result of a subtotal, but it's not calculating correctly.

 

Say:

 

where is should be 11, not 9.55.

 

Any help will surely be appreciated.

 

Thanks,

Paul

  • Anonymous's avatar
    Anonymous
    7 years ago

    Try with this:

    Measure =
    IF (
        ISCROSSFILTERED ( FTDev2018[Region] ),
        AVERAGE(FTDev2018[HEADCOUNT]),
        SUMX (
            SUMMARIZE ( ALLSELECTED ( FTDev2018), FTDev2018[REgion], "HC", AVERAGE(FTDev2018[HEADCOUNT]) ),
            [HC]
        )
    )

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Try with this:

    Measure =
    IF (
        ISCROSSFILTERED ( FTDev2018[Region] ),
        AVERAGE(FTDev2018[HEADCOUNT]),
        SUMX (
            SUMMARIZE ( ALLSELECTED ( FTDev2018), FTDev2018[REgion], "HC", AVERAGE(FTDev2018[HEADCOUNT]) ),
            [HC]
        )
    )