Logi Info v12 - two decimal places in cross-tabbed SUM aggregation
I think / I hope I'm missing something very obvious here ;)
We have a 'cross-tabbed' report. We have calculations in the main table data that gives data measured in multiples of 0.25 (hrs) per row.
When the cross-tabbed reports adds it up (SUM aggregation) it seems it can only cope with one decimal place and so it rounds up.
It appears that 0.25 is treated as 0.3 and 0.75 is treated as 0.8.
And, of course, when these individual figures are totalled, the rounding up is compounded which skews the data further.
Please tell me how to get two decimal places working in cross-tabbed results so that:
0.25 is treated as 0.25 and not 0.3, and
0.75 is treated as 0.75 and not 0.8, and therefore
0.25 + 0.75 will return a value of 1.0 and not 1.1
Thank you! :)
-
Here's an example of how you can achieve this. Typically, the summary row and column formats are based on the crosstab value label's format. If you used the wizard, most likely it applied the incorrect format to the label.
<Report ID="LogiForum.CrosstabSummary">
<Body>
<CrosstabTable ID="CrosstabTable1" AjaxPaging="True" DraggableColumns="True" ResizableColumns="True" AccessibleSummary="AnalysisGrid CrossTabTable" Caption="Date by Employee on Sum of Hours" SortArrows="True">
<DataLayer Type="Static" ID="StaticDataLayer1">
<TimePeriodColumn ID="rdHdrGrpOp_Date_FirstDayOfMonth" DataColumn="Date" TimePeriod="FirstDayOfMonth" DateGroupByOperator="FirstDayOfMonth" DataType="Date" Format="yyyy MMM" />
<SortFilter SortColumn="rdHdrGrpOp_Date_FirstDayOfMonth" DataType="Date" />
<CrosstabFilter CrosstabColumn="rdHdrGrpOp_Date_FirstDayOfMonth" CrosstabLabelColumn="Employee" CrosstabValueColumn="Hours" CrosstabValueFunction="Sum">
<CrosstabRowSummaryColumn ID="AxSummaryRowValue" Function="Sum" />
</CrosstabFilter>
<StaticDataRow Date="3/10/2023" Employee="Joe Smith" Hours="3.75" />
<StaticDataRow Date="2/10/2023" Employee="Mary Jones" Hours="8.50" />
<StaticDataRow Date="1/8/2023" Employee="Joe Smith" Hours="3.25" />
<StaticDataRow Date="1/1/2023" Employee="Mary Jones" Hours="8.25" />
<StaticDataRow Date="1/1/2023" Employee="Joe Smith" Hours="9.5" />
</DataLayer>
<CrosstabTableLabelColumn ID="colAxLabel" Header="Employee">
<Label ID="lblAxLabl" Caption="@Data.Employee~" />
<DataColumnSort DataColumn="Employee" DataType="Text" />
</CrosstabTableLabelColumn>
<CrosstabTableLabelColumn ID="colAxSummary" Header="Total Sum" Note="This is for summary rows and columns.">
<DataColumnSort DataColumn="AxSummaryRowValue" DataType="Number" />
<Label ID="lblRowSummary" Caption="@Data.AxSummaryRowValue~" Format="###,###,##0.00" />
<DataColumnSummary ID="AxColumnSummary_CrosstabTable1" DataColumn="AxSummaryRowValue" Function="Sum" />
</CrosstabTableLabelColumn>
<CrosstabTableValueColumns ID="colAxValue" Header="@Data.rdCrosstabColumn~" Format="yyyy MMM">
<Label ID="lblAxValue" Caption="=iif(@Data.rdCrosstabValCount~=0,"","@Data.rdCrosstabValue~")" Format="###,###,##0.00" />
<CrosstabValueColumnSort DataType="Number" />
<DataColumnSummary ID="AxSummaryValueSummary_CrosstabTable1" DataColumn="rdCrosstabColumn" Function="Sum" Format="#,###.#" DataType="Number" />
</CrosstabTableValueColumns>
<SummaryRow ID="AxSummaryHeaderRow" />
<InteractivePaging ShowPageNumber="True" PageRowCount="20" HideWhenOnePage="True" Location="Top" CaptionType="Image" rdIdeIdx="6" />
</CrosstabTable>
</Body>
<ideTestParams />
</Report>-1 -
0
-
VISUI - many thanks for the prompt and detailed reply - we will take the information provided and see where it gets us!
0
Please sign in to leave a comment.
Comments
3 comments