Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Percent of Total based on Dynamic Filters

Does anyone know if it's possible to have a dynamic % of Total metric in Power BI?   With some help from the community, I've managed to get a % of Total for the main dimension of my data; now, I'm ...
  • Sean's avatar
    Sean
    9 years ago

    How about this?

     

    % of Total Measure =
    DIVIDE (
        SUM ( 'Table'[Impressions] ),
        CALCULATE (
            SUM ( 'Table'[Impressions] ),
            ALLSELECTED ( 'Table'[PostClickQualityScore] ),
            ALLEXCEPT ( 'Table', 'Table'[Week] )
        ),
        0
    )

    If this is also does not produce the derised result - build a pivot table (like the the 1 in your original post)

    with the sample data but this time also show what the % actually should be.