Forum Discussion
Running total Until Current Month
- 8 years ago
I've came across another method.
Get the first date of the POBU with first True case. i.e. Process Flow = 1
First Date = CALCULATE
(MIN(Table[PO Create Date - Date].[Date]),
FILTER(ALL('Standard Naming Detail - All - Metrics - V1'),Table[POBU]=EARLIER('Table'[POBU]) && Table [Process Flow]="1")
Once the First Date Column is created, get the Cummulative Total using the below DAX:
Pareto Total Per Month =
VAR
CurrentTotal = 'Table'[First Date]
Return
SUMX(FILTER('Table','Table'[First Date]<=CurrentTotal),'Table'[Process Flow])
Hi singhv2
How about running these query respectively
flag =
IF (
[Process Flow] = 0,
BLANK (),
CALCULATE (
SUM ( 'table'[Process Flow] ),
FILTER ( ALLEXCEPT ( 'table', 'table'[POBU] ), [Index] <= EARLIER ( [Index] ) )
)
)
new flow = IF ( flag > [Process Flow], 0, [Process Flow] )
total = CALCULATE(SUM([new flow]),FILTER(ALL('table'),[Index]<=EARLIER([Index])))
Best regards
Maggie
Hi Maggie,
Can you think of some alternate way.... Index <= Earlier(Index) is taking too much time to execute 1 Million rows.
- v-juanli-msft8 years agoCommunity Support
Hi singhv2
Could you try this formual in a measure
total = CALCULATE(SUM([new flow]),FILTER(ALL('table'),[Index]<=MAX([Index])))Best Regards
Maggie
- singhv28 years agoHelper I
Do we have any other way to find out the [New Flow] ? I am stuck with the New Flow Code.