Most Visited Parking Spot By Month in column chart with multiple grouping

Certified Senior Developer

Not able to fetch the top 3 most visited parking spots for a respective month.

any suggestions

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    can you share your code with us? like this its hard to help debugging anything.

    and a bit more details of your scenario.

  • 0
    Certified Senior Developer
    in reply to Richard Michaelis

    {
      rule!VPA_CMPT_CardDisplayHeader(title:"Most Visited Parking Spot By Month",icon: "parking"),
      a!columnChartField(
      data: a!recordData(
        recordType: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey'
      ),
      config: a!columnChartConfig(
        
        primaryGrouping:    a!grouping(
          field: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey.fields.{2a9520d6-8de2-413f-ad99-7e1ed16d8291}dateCreated',
          alias: "dateCreated_month_primaryGrouping",
          interval: "MONTH_SHORT_TEXT"
        ),
        secondaryGrouping:      a!grouping(
          field: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey.fields.{08a08942-2bd1-4dc1-902d-6d434e17bbef}parkingLocationName',
          alias: "parkingLocationName_secondaryGrouping"
        ),
        
        measures: {
          a!measure(
            function: "COUNT",
            field: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey.fields.{628f5a50-0f39-45ca-a0e1-25c645fcb9d3}journeyId',
            alias: "journeyId_count_measure1",
            formatValue: "AUTO"
          )
        },
        sort: {
          a!sortInfo(
            field: "dateCreated_month_primaryGrouping",
            ascending: false
          ),
          a!sortInfo(
            field: "journeyId_count_measure1"
          )
        },
        dataLimit: null,
        showIntervalsWithNoData: true
      ),
      label: "",
      stacking: "NORMAL",
      showLegend: false,
      showDataLabels: true,
      showTooltips: false,
      labelPosition: "ABOVE",
      colorScheme: a!colorSchemeCustom(
        colors: {
          cons!VPA_HEX_COLOR_1,
          "#323b81"
        }
      ),
      height: "MEDIUM",
      xAxisStyle: "STANDARD",
      yAxisStyle: "STANDARD",
      refreshAfter: "RECORD_ACTION"
    )
    }

    pls find the same...

Reply
  • 0
    Certified Senior Developer
    in reply to Richard Michaelis

    {
      rule!VPA_CMPT_CardDisplayHeader(title:"Most Visited Parking Spot By Month",icon: "parking"),
      a!columnChartField(
      data: a!recordData(
        recordType: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey'
      ),
      config: a!columnChartConfig(
        
        primaryGrouping:    a!grouping(
          field: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey.fields.{2a9520d6-8de2-413f-ad99-7e1ed16d8291}dateCreated',
          alias: "dateCreated_month_primaryGrouping",
          interval: "MONTH_SHORT_TEXT"
        ),
        secondaryGrouping:      a!grouping(
          field: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey.fields.{08a08942-2bd1-4dc1-902d-6d434e17bbef}parkingLocationName',
          alias: "parkingLocationName_secondaryGrouping"
        ),
        
        measures: {
          a!measure(
            function: "COUNT",
            field: 'recordType!{2807e918-8a87-4696-913f-2cec0198b9bc}VPA Journey.fields.{628f5a50-0f39-45ca-a0e1-25c645fcb9d3}journeyId',
            alias: "journeyId_count_measure1",
            formatValue: "AUTO"
          )
        },
        sort: {
          a!sortInfo(
            field: "dateCreated_month_primaryGrouping",
            ascending: false
          ),
          a!sortInfo(
            field: "journeyId_count_measure1"
          )
        },
        dataLimit: null,
        showIntervalsWithNoData: true
      ),
      label: "",
      stacking: "NORMAL",
      showLegend: false,
      showDataLabels: true,
      showTooltips: false,
      labelPosition: "ABOVE",
      colorScheme: a!colorSchemeCustom(
        colors: {
          cons!VPA_HEX_COLOR_1,
          "#323b81"
        }
      ),
      height: "MEDIUM",
      xAxisStyle: "STANDARD",
      yAxisStyle: "STANDARD",
      refreshAfter: "RECORD_ACTION"
    )
    }

    pls find the same...

Children
No Data