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.
Hi there community,
Hoping to get some guidance on my 3rd measure to calculate the Cumulative Total by index:
In my first measure, I'm calculating Bank Submissions:
Bank Submissions =
DISTINCTCOUNTNOBLANK('Ongoing & Unpaid Data Revised'[Policy No#])
In my second measure, I'm calculating the Previous Index Churn:
Previous Index Churn =
VAR CV = [Bank Submissions]
VAR D = SELECTEDVALUE( 'Ongoing & Unpaid Data Revised'[Index] ) - 1
VAR E =
CV - CALCULATE(
[Bank Submissions],
'Ongoing & Unpaid Data Revised'[Index] = D && CV <> BLANK(),
ALLSELECTED( 'Ongoing & Unpaid Data Revised'[Index] ))
RETURN
ABS(E)
Then in my 3rd measure, I'm trying to get the Cumulative Churn:
Cumulative Churn =
CALCULATE (
[Previous Index Churn],
FILTER (
ALLSELECTED ( 'Ongoing & Unpaid Data Revised'[Index]),
'Ongoing & Unpaid Data Revised'[Index] <= MAX('Ongoing & Unpaid Data Revised'[Index]
)
))
This is not giving me the desired results, but instead I'm just getting a repeat of the total:
Hi BICrazy ,
Maybe you need to try the following measure:
Cumulative Churn =
SUMX (
TOPN (
MAX ( 'Ongoing & Unpaid Data Revised'[Index] ),
SUMMARIZE (
'Ongoing & Unpaid Data Revised',
'Ongoing & Unpaid Data Revised'[Index],
"PreviousChurn", [Previous Index Churn]
)
),
[PreviousChurn]
)
Be aware that without any data is difficult to know if this is the correct syntax.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.