Distribution of values Behind code

Avatar

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

130 likes

Total Posts

144 posts

Correct reply

45 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
MVP
kapilKochar
MVP

Likes

130 likes

Total Posts

144 posts

Correct reply

45 solutions
Top badges earned
Validate 1
Contributor
Give Back 10
Give Back 5
Give Back 3
View profile
kapilKochar
MVP

09-03-2021

Hi Everyone, 

Can someone please help me to understand from where I can find the code/logic behind "Distribution of values" option we have in query activity

 

kapilKochar_1-1615352775030.png

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Affirm 100
MVP
_Manoj_Kumar
MVP

Likes

125 likes

Total Posts

329 posts

Correct reply

102 solutions
Top badges earned
Affirm 100
Validate 1
Contributor
Ignite 1
Shape 1
View profile

Avatar
Affirm 100
MVP
_Manoj_Kumar
MVP

Likes

125 likes

Total Posts

329 posts

Correct reply

102 solutions
Top badges earned
Affirm 100
Validate 1
Contributor
Ignite 1
Shape 1
View profile
_Manoj_Kumar
MVP

10-03-2021

Hello @kapilKochar 

 

In the backend the query is using GroupBy in the queryDef.

 

You can achieve the same result by adding groupBy attribute in your queryDef code.

 

Here is the same code:

   select: {node:[
      {alias: '@expr', expr: field, groupBy: 'true', noSqlBind: 'true'},
      {alias: '@count', expr: 'COUNT()', label: 'Count'},
    ]},

Let me know if that helps.

 

Avatar

Avatar
Validate 1
Level 2
akashaj7696
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

3 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 3
View profile

Avatar
Validate 1
Level 2
akashaj7696
Level 2

Likes

5 likes

Total Posts

29 posts

Correct reply

3 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 3
View profile
akashaj7696
Level 2

10-03-2021

Hi Kapil,

This are usually all created using Input forms. You can find the code behind that in there. Go from Administration > Configuration > Input forms and search for Distribution of values form.

Thanks,