Forum Discussion

Arranafc19's avatar
Arranafc19
Helper IV
7 years ago
Solved

Cumulative Percentage

I am working on a report which calculates the percentage of sold per month , with the null value being the ones not sold. I have managed to create the below dataset and calculated the percetages and ...
  • Cmcmahan's avatar
    Cmcmahan
    7 years ago

    So you're very close.  ALLSELECTED returns all values that are currently being used in the table.  You just need to add an extra filter statement that specifically calls out blank month of closure as something you don't want included in this measure.

    Cumulative Total =
    CALCULATE (
              COUNT ( 'Actual v Expected'[Count] ),
        FILTER (
            ALLSELECTED ( 'Actual v Expected' ),
            ('Actual v Expected'[MONTH_OF_CLOSURE] <= MAX ( 'Actual v Expected'[MONTH_OF_CLOSURE] ) &&
    ('Actual v Expected'[MONTH_OF_CLOSURE] <> BLANK()) ) ))