Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Calculation Question (Set Analysis vs. "If")

Hello All,

I am have a small issue trying to get something to work using set analysis and thought maybe someone out here could help.  The first statement works fine, but the second one using set analysis does not.  I was wondering if I am doing something wrong.  Thanks  Thom

1)    Sum(if(Contract_End_Date_Num >= Roll_Out_Date_Num, ExtendedAmount))

2)    Sum({<Contract_End_Date_Num = {">= Roll_Out_Date_Num"}>} ExtendedAmount)

1 Solution

Accepted Solutions
tmumaw
Specialist II
Specialist II
Author

Thanks Jagan that worked perfectly.  You don't know how long I have been looking at that statement wondering why it would not work.  Have a great day.  I know I will now.

Thom

View solution in original post

4 Replies
jagannalla
Partner - Specialist III
Partner - Specialist III

Tmumaw,

Yes it is wrong way of using set analysis.

Note:

Your first expression will gives the data in loading process i.e 1 by 1 check. When coming to second expression you should assign value to compare.

For example:

sum( {$<Year = {2000}, Region = {US, SE, DE, UK, FR}>} Sales )

sum( {$<Year = {“>1978<2004”}>} Sales )

coming to your expression you should compare either max or min of Roll_Out_Date_Num.

Sum({<Contract_End_Date_Num = {">=$(= Min(Roll_Out_Date_Num))"}>} ExtendedAmount)

Hope it helps you..

Cheers !

tmumaw
Specialist II
Specialist II
Author

Thanks Jagan that worked perfectly.  You don't know how long I have been looking at that statement wondering why it would not work.  Have a great day.  I know I will now.

Thom

jagannalla
Partner - Specialist III
Partner - Specialist III

I didn't get what you said? But one think i want to know whether you had find solution yourself or my solution helped you?

If you find solution can you share with us. B'coz you ticked your post as correct.

tmumaw
Specialist II
Specialist II
Author

Your's worked perfectly.  Thanks