I have a formula field that qualifies each transaction(record) with or without VS.
I would like to have a crosstab that has two columns that shows the average of each category by customer. Then a column that displays the difference.
Is this doable? The cross tab is attached.
Thanks!
Crystal Reports
Last Comment
evend
8/22/2022 - Mon
LinInDenver
I don't see an attachment, but this should be possible. I would create 2 formulas, one for records containing 'VS' and those that don't.
//Counts if they have VS in them
IF {table.field} like '*VS*' then 1 else 0
//Counts if they don't have VS in them
IF {table.field} like '*VS*' then 0 else 1
These two formulas would show a count of how many records contain VS. If you have an actual numeric field value you want represented, replace the 1s above with {table.field} containing the number you are after.
Base your cross tab on these two formulas.
To find the different, you would need to look into calculated members. These are fields you can add into cross tabs, but can be a little tricky.
evend
ASKER
I have this formula to qualify each transaction\record. Do you have another means to establish the difference. I want to get the difference between the average daily sales.
I can get the average daily sales by category using groups and summaries. I just can not seem to do the math between groups?
If {Vend_Visits.visit_DateTime} > {non_vending_equipment.in_service_date} Then
"With VendScreen"
Else
"Without VendScreen"
//Counts if they have VS in them
IF {table.field} like '*VS*' then 1 else 0
//Counts if they don't have VS in them
IF {table.field} like '*VS*' then 0 else 1
These two formulas would show a count of how many records contain VS. If you have an actual numeric field value you want represented, replace the 1s above with {table.field} containing the number you are after.
Base your cross tab on these two formulas.
To find the different, you would need to look into calculated members. These are fields you can add into cross tabs, but can be a little tricky.