Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Total by 3 categories

Hi, i have a test table: ID Nrb  Country Scenario Share 363331 Australia Actual 1.00 363331 China Actual 1.00 363331 Denmark Actual 1.00 363331 Indonesia Actual 1.00 ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous,

    You can try to use the following measure formulas, I add a variable with summarize function to aggregate value based on categories and use the iterator function to apply these second aggregations to summary previous results.

    formula =
    VAR summary =
        SUMMARIZE (
            ALLSELECTED ( Table ),
            [ID Nrb],
            [Country],
            [Scenario],
            "_Share", [Share]
        )
    RETURN
        SUMX ( summary, [_Share] )

    Regards,

    Xiaoxin Sheng