a bar chart where I can get the average time the task had taken based on funding Type Column

Hi All,

 

I need to create a bar chart where I can show the average time a certain task has taken based on criteria on other column. Below is the snapshot of report. I need to create a chart where I can see the aggregated average Completion time based on Type.  For each type, the color of bar needs to be different. I did try query analytics report but I could not get aggregated average completion time. Also, not sure how to get different color for each type. Can one guide how can i do that?

Thanks

 

  Discussion posts and replies are publicly visible

Parents
  • Hi Rishub,

    You can find documentation related to your question at this URL: docs.appian.com/.../recipe_aggregate_data_from_a_data_store_entity_and_display_in_a_chart.html

    The relevant bits of code are as follows:

    local!datasubset: a!queryEntity(
    entity: cons!EMPLOYEE_ENTITY,
    query: a!query(
    aggregation: a!queryAggregation(aggregationColumns: {
    a!queryAggregationColumn(field: "department", isGrouping: true),
    a!queryAggregationColumn(field: "id", aggregationFunction: "COUNT"),
    }),
    pagingInfo: local!pagingInfo
    )
    )

    Here, you would specify your "type" in the first queryAggregationColumn field and set isGrouping to true. This will group the data based on that field.

    You would then specify your "Completion Time" as the second queryAggregationColumn field and set aggregationFunction to "AVG".

    I'm not sure how you're representing your "Completion Time" in your database, so AVG may or may not work, but given this piece of code, you should be able to work out a solution from here.

    Regards,
    Jacob
Reply
  • Hi Rishub,

    You can find documentation related to your question at this URL: docs.appian.com/.../recipe_aggregate_data_from_a_data_store_entity_and_display_in_a_chart.html

    The relevant bits of code are as follows:

    local!datasubset: a!queryEntity(
    entity: cons!EMPLOYEE_ENTITY,
    query: a!query(
    aggregation: a!queryAggregation(aggregationColumns: {
    a!queryAggregationColumn(field: "department", isGrouping: true),
    a!queryAggregationColumn(field: "id", aggregationFunction: "COUNT"),
    }),
    pagingInfo: local!pagingInfo
    )
    )

    Here, you would specify your "type" in the first queryAggregationColumn field and set isGrouping to true. This will group the data based on that field.

    You would then specify your "Completion Time" as the second queryAggregationColumn field and set aggregationFunction to "AVG".

    I'm not sure how you're representing your "Completion Time" in your database, so AVG may or may not work, but given this piece of code, you should be able to work out a solution from here.

    Regards,
    Jacob
Children