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

Cumulative totals issue

Hi All,

I have below straight table:

  

CYTD approvalsCYTD ClaimsPYTD approvalsPYTD Claims
12003001100200

The dimension is

Month(hidden)

Expressions:

Mon - only({CrdtMonthNumber = {$(=Max({<Year = { $  =Max (Year))}>}CrdtMonthNumber ))}>}Month)

CYTD approvals = sum(Total {<Year = {=Max(Year))}>}Approvals)

CYTD Claims = sum(Total {<Year = {=Max(Year))}>}Claims)

PYTD approvals = sum(Total {<Year = {=Max(Year)-1)}>}Approvals)

CYTD Claims = sum(Total {<Year = {=Max(Year)-1)}>}Claims)

Now the requirement is , we have to add classes dimension to this. We have 3 Classes and so the table should have 3 rows . Something like this for the above table.

   

ClassesCYTD approvalsCYTD ClaimsPYTD approvalsPYTD Claims
A600100500100
B30010030050
C30010030050

When added the Classes dimension its not distributing the values. Rather its showing the total in all the rows. Any help would be appreciated.

Thanks,

Anupama Jagan

10 Replies
sunny_talwar

May be change your expressions to this

CYTD approvals = sum({<Year = {=Max(Year))}>}Approvals)

CYTD Claims = sum({<Year = {=Max(Year))}>}Claims)

PYTD approvals = sum({<Year = {=Max(Year)-1)}>}Approvals)

CYTD Claims = sum({<Year = {=Max(Year)-1)}>}Claims)

Remove all the totals.... or this

CYTD approvals = sum(Total <Month> {<Year = {=Max(Year))}>}Approvals)

CYTD Claims = sum(Total <Month> {<Year = {=Max(Year))}>}Claims)

PYTD approvals = sum(Total <Month> {<Year = {=Max(Year)-1)}>}Approvals)

CYTD Claims = sum(Total <Month> {<Year = {=Max(Year)-1)}>}Claims)

Anonymous
Not applicable
Author

Hi Sunny

Both are not yielding the right result.

This table shows the cumulative total till current month for this year and previous year appr.

So in this table

CYTD approvalsCYTD ClaimsPYTD approvalsPYTD Claims
12003001100200

1200 CYTD approvals shows the cumulative total till current month of this year. this 1200 i need to split to 3 classes A,B,C

Likewise for CYTD Claims ,PYTD approvals and PYTD Claims

Anonymous
Not applicable
Author

Hi Sunny,

In your expression instead of Month when i replaced Class I'm able to get the total split into 3 but its getting repeated for 6 times. Is there way to limit it to just one?

CYTD approvals = sum(Total <Class> {<Year = {=Max(Year))}>}Approvals)

CYTD Claims = sum(Total <Class> {<Year = {=Max(Year))}>}Claims)

PYTD approvals = sum(Total <Class> {<Year = {=Max(Year)-1)}>}Approvals)

CYTD Claims = sum(Total <Class> {<Year = {=Max(Year)-1)}>}Claims)

sunny_talwar

Would you be able to share a screenshot of what you are seeing?

Anonymous
Not applicable
Author

Hi Sunny,

I will not be able to take a screenshot as im working in remote desktop.

But after replacing the month with Class this is how im getting the result

     

ClassesCYTD approvalsCYTD ClaimsPYTD approvalsPYTD Claims
A600100500100
B30010030050
C30010030050
A600100500100
B30010030050
C30010030050
A600100500100
B30010030050
C30010030050
A600100500100
B30010030050
C30010030050
A600100500100
B30010030050
C30010030050
A600100500100
B30010030050
C30010030050

1200 is split into 3 but the same set is repeated six times

sunny_talwar

May be add this if statement to your expressions

=If(Month = Max(TOTAL Month), Expression1)

and so on...

Anonymous
Not applicable
Author

Hi Sunny,

When i added the If condtion im getting values for Dec rather than Jun.

sunny_talwar

lol okay... this is probably not going to work... unless you share a sample or something else to look at... I might not be able to offer help ... But I hope someone else can

Anonymous
Not applicable
Author

Hi Sunny,

I have attached a sample data and i think all the dimensions i have used in the expression are there..

CrtdMonthNumber is nothing but i have assigned numbers to the months..

Sample app isn't possible as i'm working in remote desktop

Appreciate all your help..