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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
theo
Helper III
Helper III

cumulative sum

Hi Everyone

I need help to create a sum of count or percent but my data have no date entry.

 

this is the measure that i tried to create by it's not working:

cumulative percent = SUMX(FILTER(all(table[products]),table[products]<=max(table[products])),calculate(100.00*(SUMX(all(table[products]),calculate(COUNT(table[products])))/1050)))

 

here i was trying to do a cumulative sum of the percentage where my data size is 1050 hence fixed.

 

below is the sample of the table visualization i have for my data.  i used the quick calc for the count and % of count of products which is a unique text entries.  the last column what i am trying to create.

Typecount of products% total count of productsCumulative percentage
150047.62%47.62%
333031.43%79.05%
222020.95%100.00%

 

thanks in advance.

 

3 REPLIES 3
Sean
Community Champion
Community Champion

Continued from here...

http://community.powerbi.com/t5/Desktop/measure/m-p/136791#U136791

 

Then  just add these 2 Columns

 

% of GT = 
DIVIDE ( 'New Table'[Count of Type], SUM ( 'New Table'[Count of Type] ), 0 )

Cumulative % = 
DIVIDE (
    'New Table'[Cumulative Sum Column],
    SUM ( 'New Table'[Count of Type] ),
    0
)

New Table - Rank and RT and 2%.png

 

Hope this helps! Smiley Happy

@Sean 

thanks, i tried but i have different result from what is expected using the summarize formula.  the rank is 1 for all, see below.  I need that to be corrected first before i can use the solution you have proposed.  hope you can advise on the summarize formula error.

  Capture1.PNG

Capture.PNG 

in addition, i realized the result will be fixed bu i need something that could change at a later stage.  i have another column for the product code, then new ones will be added later.  i will then need the cumulative sum based on the new column (product code) and not the type.  thank you so much for providing time to help.

Hi @theo,

You shoud use the [Type] rather than [Type Rank By Count].

Best Regards,
Angelia

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors