Group
-
- Posts: 1
- Joined: Tue Oct 10, 2017 12:44 pm
Group
I need to group on a calculation field (or total field) based on what range the calced field is in.____For Example:____Total over 1,000,000 __750,000 to 1,000,000__500,000 to 750,000____
-
- Posts: 47
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Group
>I need to group on a calculation field (or total field) __>based on what range the calced field is in. __>__>For Example: __>__>Total over 1,000,000 __>750,000 to 1,000,000 __>500,000 to 750,000 ______To do this, you^ll need to create a calculated field: Menu / Calculations / Calculated Field / New____Name:__AmtGroup____Expression:__iif(Amount > 1000000, "Group 1", iif(Amount > 750000, "Group 2", iif(Amount > 500000, "Group 3", "Group 4")))____What this does is check your Amount field. The first time it passes the test comparing it to a value after the inline if (iif), it displays the text shown in quotes immediately following the test. If it doesn^t pass the test, it drops to the next selection.____You go from high down to low to ensure that things get evaluated in the proper order. That is, if you started by checking for the Amount being > 500000, then one that was 1010333 would fall into the "Group 3" category instead of "Group 1" where it belongs.__