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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors