No Average in Data Cubes? [message #365139] |
Sat, 13 September 2008 10:12  |
Eclipse User |
|
|
|
When making a data cube, there are many missing aggregate functions. Any
reason why? I can't calculate the average or do anything the specifies
a group (there is no "Aggregate on" I assume thats why I cant use the
functions that require it).
I don't know If I'm being clear so let me give an example:
Lets say I have a data cube with dimensions Car/Make and Date, and
measure Sales(Sum). I can make across tab like this:
| | April |
| | M | T | W | T | F | S | S |
--------------------------------------
|ford | 3 | 2 | 1 | 0 | 4 | 3 | 2 |
|honda | 5 | 6 | 7 | 2 | 5 | 1 | 0 |
|chevy | 4 | 6 | 0 | 3 | 7 | 1 | 0 |
--------------------------------------
|total |12 |14 | 8 | 5 |16 | 5 | 2 |
However, how do I make the cross tab with the average sales per day for
all months? It looks like I have to make the query calculate it first,
then use the value with a last, first, min, or max aggregation. I must
be missing something, as most other aggregations and groupings are so
easy in Birt.
Any pointers?
Thanks,
Steven
|
|
|
|
|
(no subject) [message #718204 is a reply to message #718075] |
Tue, 23 August 2011 10:56   |
Eclipse User |
|
|
|
Johannes,
Any chance you could write a report with the sample db or a scripted
dataset that sets some sample values that would show the issue? That
way we could test it.
Jason
On 8/23/2011 3:28 AM, Johannes.Koshy wrote:
> Hi, i have a similar problem where i would like to use AVG instead of
> the offered ones.
> My Data would look like
>
> Name|Date|Value
> and My Data Cube would Group by Name, Group by Day of Week and then
> summarize the value by max.
> For the summary of the value i would love, average instead of max.
> How would i achive this?
> I use the Data for an Pie Chart with Category Axis, Name, yAxis Val and
> opt-Y-Achis Grouping the Day of Week.
>
> I tried to make to summaries(measures), sum and count, but didnt know
> how to use them to define a third, AVG.
>
>
>
|
|
|
|
|
|
|
|
|
Re: (no subject) [message #719263 is a reply to message #719105] |
Fri, 26 August 2011 10:23  |
Eclipse User |
|
|
|
Johannes,
There is a sort icon beside the category and optional grouping settings
on the second tab of the chart wizard that allows you to group on a unit
type. For example with dates you can do things like year, month,
quarter, week etc. I modified the example to change the scripted
dataset to have two months and then I changed the grouping for the
optional grouping field to be months.
Jason
On 8/26/2011 1:12 AM, Johannes.Koshy wrote:
> This would not yield the same result i guess :/, cause
> in the data cube you have grouping options like Week of the Month etc.
> When you have a timeframe of one Year but wanted an average for each day
> in a week,
> you would get it with Day of the Week in the data cube, but not with the
> Chart by using its
> grouping options.
Attachment: avgxtab.zip
(Size: 7.45KB, Downloaded 284 times)
|
|
|
Powered by
FUDForum. Page generated in 0.31574 seconds