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
bi_team_ru2
Frequent Visitor

power bi abc with cumulative total

good noon!

 

2.gif

i need take the cumulative total from the  Measure SHARE (desc)

but, then i`m create a new measure Ranking with formula

Ranking = CALCULATE(('Test'[Share]);ALLEXCEPT(Test;Test[Client];Test[Manager]);Test[CSumMon]>=EARLIER(Test[CSumMon]))

the power bi said:

EARLIER / EARLIEST refers to an earlier line context, which does not exist.

and then i`m changed measure to a column, in the result i see the count of element any sorting

 

how do , then Measure summing with cumulative total?

or how do, then in column i have the share of any elements?

sens yours

1 ACCEPTED SOLUTION
bi_team_ru2
Frequent Visitor

MPop = sum(Population[Population])

MTotalPop = CALCULATE(SUMX('Population';'Population'[Population]);ALLSELECTED('Population'))

MPopCumul1 = CALCULATE('Population'[MPop];FILTER(ALLselected('Population');'Population'[MPop]>=MAXx('Population';'Population'[MPop])))

and Measure Share
MShare = DIVIDE('Population'[MPop];'Population'[MTotalPop]) 

MShareCumul1 = CALCULATE('Population'[MPopCumul1]/'Population'[MTotalPop])

and Measure ABC
МABC = if(DIVIDE('Population'[MPopCumul];'Population'[MTotalPop]) <=0,7;"A";if(DIVIDE('Population'[MPopCumul];'Population'[MTotalPop]) <=0,9;"B"; "C"))

View solution in original post

1 REPLY 1
bi_team_ru2
Frequent Visitor

MPop = sum(Population[Population])

MTotalPop = CALCULATE(SUMX('Population';'Population'[Population]);ALLSELECTED('Population'))

MPopCumul1 = CALCULATE('Population'[MPop];FILTER(ALLselected('Population');'Population'[MPop]>=MAXx('Population';'Population'[MPop])))

and Measure Share
MShare = DIVIDE('Population'[MPop];'Population'[MTotalPop]) 

MShareCumul1 = CALCULATE('Population'[MPopCumul1]/'Population'[MTotalPop])

and Measure ABC
МABC = if(DIVIDE('Population'[MPopCumul];'Population'[MTotalPop]) <=0,7;"A";if(DIVIDE('Population'[MPopCumul];'Population'[MTotalPop]) <=0,9;"B"; "C"))

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
Top Kudoed Authors