Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross tab with 2 Average

Status
Not open for further replies.

kuekue

Programmer
Dec 2, 2008
35
TH
Hello everyone,

i need to show cross tab with 2 average, data like this

dataoa.jpg

Link

the point is,

i need something like 'cross tab' to show data and chart

then it 3 rows : ED_P_Max, Average all (ED_P_Point), Average only Ed_P_User_target (ED_P_Point)
and column is : ED_P_Seq

then when i create cross tab it like this :

showooy.jpg

Link

Code:
----- ED_P_User_target = 2148 ----
in first row : show max  
in second : show average by ED_P_User_target
-----------------------------------
----- ED_P_User_target = 2149 ----
in first row : show max  
in second : show average by ED_P_User_target
-----------------------------------
in total : show average of all ED_P_User_target


BUT i need to show 3 Rows per ED_P_User_target

LIKE THIS :
Code:
----- ED_P_User_target = 2148 ----
in first row : show max  
in second : show average of all ED_P_User_target
in third : show average by ED_P_User_target
--------------------------
----- ED_P_User_target = 2149 ----
in first row : show max  
in second : show average of all ED_P_User_target
in third : show average by ED_P_User_target
--------------------------

so i can't to show average of all ED_P_User_target, and i think cross tab can show then chart can too.

Many thanks, for read a long question.
 
no one answer me.
OK.
i can solve this.
1. i query with SQL for average.
2. i create view to merge average value.
3. i use crystal report to generate cross-tab and graph.

Thanks.
 
As long as you have a group in the main report on Ed_P_Seq (it can be suppressed), you can create a formula {@AveAllbyEDPSeq}:

average({Ed_P_User_Target},{Ed_P_Seq})

Then in the crosstab (or chart), add {@AveAllbyEDPSeq} as a summary field, and change the summary to a maximum.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top