Forum Discussion
Cumulative Total by Index
- 6 years ago
Hi CoreyP ,
This is a context problem, when you add the measure in your table since you have other columns within the visual and all of the fields belong to the same table the context changes so you need to apply the filter no only to the INDEX column but to all other columns in this case you need to redo your measure to:
Cumulative = CALCULATE ( SUM ( 'Pick sequence'[ONHAND_QTY] ); FILTER ( ALLSELECTED ( 'Pick sequence'[Pick Sequence]; 'Pick sequence'[PALLET_ID]; 'Pick sequence'[Item N.º] ); 'Pick sequence'[Pick Sequence] <= MAX ( 'Pick sequence'[Pick Sequence] ) ) )Check PBIX file attach I added a slicer for pallet s you can try to select different values and check that the cumulative still is calculated.
You need to do a similar measure to this:
Cumulative =
CALCULATE (
SUM ( TABLE[ONHAND QTY] );
FILTER ( ALLSELECTED ( TABLE[INDEX] ); TABLE[INDEX] <= MAX ( TABLE[INDEX] ) )
)
This measure simply returns the same value.
- MFelix6 years agoSuper User
Hi CoreyP ,
Try the following change in the code:
Cumulative = CALCULATE ( SUM ( 'Pick Sequence'[ONHAND_QTY] ), FILTER ( ALL ('Pick Sequence'[Pick Sequence] ), 'Pick Sequence'[Pick Sequence] <= MAX ( 'Pick Sequence'[Pick Sequence] ) ))- CoreyP6 years agoSolution Sage
Unfortunately, that does not work either.
I've kinda all but given up. I keep googling and re-writing and re-googling and re-googlewriting and now I just think it's a tad too advanced. Or, what's probably more likely, I'm not advanced enough to write it.
- Ashish_Mathur6 years agoSuper User
Hi,
Share the link from where i can download your PBI file.
- MFelix6 years agoSuper User
Hi CoreyP ,
This is a context problem, when you add the measure in your table since you have other columns within the visual and all of the fields belong to the same table the context changes so you need to apply the filter no only to the INDEX column but to all other columns in this case you need to redo your measure to:
Cumulative = CALCULATE ( SUM ( 'Pick sequence'[ONHAND_QTY] ); FILTER ( ALLSELECTED ( 'Pick sequence'[Pick Sequence]; 'Pick sequence'[PALLET_ID]; 'Pick sequence'[Item N.º] ); 'Pick sequence'[Pick Sequence] <= MAX ( 'Pick sequence'[Pick Sequence] ) ) )Check PBIX file attach I added a slicer for pallet s you can try to select different values and check that the cumulative still is calculated.