BookmarkSubscribeRSS Feed
blewsas
Obsidian | Level 7

Hi,

 

I've created the following aggregated periodic measure called "Consumed":

 

aggregated measure.jpg

 

But when I try to calculate the average of that measure, I get a message that "Nested aggregated expressions are not supported":

 

nested aggregated.jpg

 

So - how do I calculate the AVERAGE (and the MIN and the MAX)?

 

Thanks,

 

Barry Lewis

 

 

3 REPLIES 3
PetriRoine
Pyrite | Level 9

Hello @blewsas ,

 

The problem in your approach is that VA doesn't currently allow nested aggregated expressions i.e. aggregated operators inside aggregated operators. 

 

VA 8.3 introduced capability to create an aggregated data source which allows us to create Consumed Avg, Consumed Min and Consumed Max without using nested aggregated operators. Although this approach has caveats like needing to define categories beforehand and possibly needing to Join the data to others for report actions to work.

 

Create aggregated data source

  1. In the Data pane, select a data source.
  2. Click Action icon 
     
     , and then select New data from aggregation of data-source. The New Aggregated Data window is displayed.
  3. Select the data items Needed categories + Consumed, Time to add to the aggregated data source in the Available items list. Then, click +> to move it to the Selected items list.
  4. (Optional) Change the name of the aggregated data source in the Name field.
  5. Click Ok. The new aggregated data source is available in the Data pane.

Now your new data source has a measure Consumed of which aggregation you can define normally to be sum/avg/min/max etc...

 

Maybe this approach would work for you?

 

Best regards,

Petri

blewsas
Obsidian | Level 7

Thanks @PetriRoine,

 

Thanks for your reply.  I thought about that approach too, but it doesn't seem to work.  😕

 

Here are my data items after I created the "Consumed" item using the calculation I previously posted.

 

blewsas_0-1590418647423.png

However, when I create a new aggregated data source from this data source, "Consumed" is not one of the available items:

blewsas_1-1590418759938.png

 

 

 

 

PetriRoine
Pyrite | Level 9

You are correct, that indeed seems to be the case. I did some testing and it appears that Aggregated Data Sources support f.ex. Aggregated (simple) and Aggregated (advanced) operators but not the Aggregated (periodic) operators.

 

Unfortunately I do not have another idea how to get the wanted end result.

 

Best regards,

Petri

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1188 views
  • 0 likes
  • 2 in conversation