![]() On the Roles pane, I'll add Order Total (3M change) to the Measures role. I'll click the crosstab in the canvas to select it. Now, I'll add this data item to the crosstab. This data item is added to the Aggregated Measure group in the Data pane. I'll use the Dollar format with a width of 12 and 2 decimals. This will calculate the order total for three months prior to a given month. Then I'll change the offset interval parameter to -3. The easiest way to do this is to copy the operator and right-click the number field on the right of the minus sign and select Paste. Now that we have the RelativePeriod operator defined for a selected month's value, we need to define the operator for three months prior. Other options enable partial month aggregations based on a selected date or based on today's position in a given interval. This aggregates the order total for the entire month. For the scope parameter, I'll verify that _Full_ is specified. ![]() This will calculate the order total for a given month, where the month is specified by the row value in the crosstab. For the offset interval parameter, I want to verify that 0 is selected. Because we want to calculate the 3 month change, however, we will explicitly define this as _ByMonth_. You could also choose _ByQuarter_ to aggregate at the quarterly level, _ByYear_ to aggregate at the yearly level, or _Inferred_ which will automatically select the aggregation level based on the format for the date data item in the object. For the aggregation interval parameter, I'll select _ByMonth_ this specifies that OrderTotals will be aggregated at the monthly level. For the date parameter, I'll select Transaction Date this specifies which date item will be used for aggregation purposes. I'll discuss how this parameter works and look at the other options a bit later. For the time filters parameter, I want to select _ApplyAllFilters_. For the measure parameter, I'll right-click the number field and select Replace with > OrderTotal. For the aggregation type parameter, I'll verify that _Sum_ is specified this will sum the measure for the object. Periodic aggregated operators (like RelativePeriod), require several parameters. Remember, each aggregated operator requires specific parameters. The RelativePeriod operator returns an aggregated value for a period of time that is relative to the current period (for example, the current month or the prior month). I'll expand the Aggregated (periodic) group and drag RelativePeriod to the number field on the left of the minus sign. ![]() I want to determine the Order Total for a given month and then subtract from that the Order Total for three months prior. I'll double-click x-y to add it to the expression. On the left side of the window, I'll click Operators and expand the Numeric (simple) group. In this case, the data will first be aggregated by month and those values will be used to calculate the change. ![]() Because the table contains daily data, in order to calculate the 3 month change, I will need to create an aggregated measure. For the Name, I'll enter Order Total (3M change). To start, I'll go to the Data pane and select New data item > Calculated item. I want to create a new periodic aggregated measure that shows the 3-month change in order total. This report already contains a crosstab that shows order totals by month and a page prompt with a slider control to filter by transaction date. I'm already signed in and I have the VA2-Demo7.2b report open in Visual Analytics. In this demo, I'll create a periodic aggregated measure and use it in a crosstab.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |