Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
yellow_old_5
Helper II
Helper II

Total by 3 categories

Hi, i have a test table:

ID Nrb CountryScenarioShare
363331AustraliaActual1.00
363331ChinaActual1.00
363331DenmarkActual1.00
363331IndonesiaActual1.00
363331IndiaActual1.00
363331JapanActual1.00
363331CanadaActual1.00
363331FinlandActual1.00
363331NorwayActual1.00
363331SingaporeActual1.00
363331GermanyActual1.00
363331SpainActual1.00
Total   1.00

I want to have a total share group by those 3 colums like 12

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @yellow_old_5,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @yellow_old_5,

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
ryan_mayu
Super User
Super User

@yellow_old_5 

is share column a measure?

if not, when you set share as sum, you should get 12

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi, I forgett mention that Share is a measure

@yellow_old_5 

maybe you can try this

measure = sumx('Table',[share])
 
1.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.