Topic: Formula help Posted: 24 Jul 2008 at 10:05am
I have field which is being pulled directly from the stored proc in my crystal report. I then sum this field based on group created using the Running Total Fields in the field explorer. I need to get the percent value of this field of the total sum but i keep on getting the error "The field cannot be used as a group condition field".
for example :
Group by Department No of sales %
A 80 trying to get this value B 100
total 180 (running total)
my formula used is PercentOfSum(no of sales, running total) but i keep on getting the error.
Thanks for the quick reply. I tried that and the formula did not throw any errors however i now realised that the Departments A, B , C are actually Group Name and hence the result is incorrect.
The department has been group and the total sales is sum of the sales field from store proc.
Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Posted: 25 Jul 2008 at 5:13am
Hi,
create formula
PercentOfSum ({Table.Sharesexecuted}, {Table.Dept}) place that in details section or group header
which gave me the correct output.
then i inserted summary as
Insert summary ,
select shares executed calculate summary as SUM
Location as Group which is dept then select Show as Percentage of grand total sum of sale it will create % for all groups then just cop paste that in report footer
Thanks Rahul for your assistance and giving me some indications.
I realised that my total was calculating based on group as well when it should be sum of ShareExecuted. The share executed should have been sum(share executed, dept) and it worked when i used percentofsum(shareexecuted, dept)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum