Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Mkh13646
Contributor
Contributor

calculate sum with for specific month and class of data

Hi everyone, 

I would like to draw a table which has two rows that shows the progress of a project, in row one I have the progress from the beginning and in row two I have only progress of last month, I also should filter special class of activities which their class type is 'develop' so I write a list value in my dimension and calculate my expression like below but it doesn't work 

If(Valuelist('Lastmonth','Frombegin') = 'Lastmonth', If(FMONTH =[MRS_PRJ_PROG.CURMONTH],Sum({<TYPE_ = {"DEVELOP"}>}[MRS_PRJ_PROG.PROG_])),

If(Valuelist('Lastmonth','Frombegin')='Frombegin', If(FMONTH <=[MRS_PRJ_PROG.CURMONTH],Sum({<TYPE_ = {"DEVELOP"}>}[MRS_PRJ_PROG.PROG_])) ,

)
)

develop

Plan

progress

percent

Form begin

160

60

38%

Last month

 

 

 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

How about this?

If(Valuelist('Lastmonth','Frombegin') = 'Lastmonth',

  Sum({<TYPE_ = {"DEVELOP"}>} If(FMONTH = [MRS_PRJ_PROG.CURMONTH], [MRS_PRJ_PROG.PROG_])),

If(Valuelist('Lastmonth','Frombegin')='Frombegin',

  Sum({<TYPE_ = {"DEVELOP"}>} If(FMONTH <= [MRS_PRJ_PROG.CURMONTH],[MRS_PRJ_PROG.PROG_]))

))

View solution in original post

2 Replies
sunny_talwar

How about this?

If(Valuelist('Lastmonth','Frombegin') = 'Lastmonth',

  Sum({<TYPE_ = {"DEVELOP"}>} If(FMONTH = [MRS_PRJ_PROG.CURMONTH], [MRS_PRJ_PROG.PROG_])),

If(Valuelist('Lastmonth','Frombegin')='Frombegin',

  Sum({<TYPE_ = {"DEVELOP"}>} If(FMONTH <= [MRS_PRJ_PROG.CURMONTH],[MRS_PRJ_PROG.PROG_]))

))
Mkh13646
Contributor
Contributor
Author

thank you very much @sunny_talwar  it worked very well